from setuptools import setup, find_packages
import os

# Read the long description from README
readme_path = os.path.join(os.path.dirname(__file__), "README.md")
if os.path.exists(readme_path):
    with open(readme_path, "r", encoding="utf-8") as fh:
        long_description = fh.read()
else:
    long_description = "A ZMQ-based messaging library for robot operations with automatic publisher registration and name-based pub/sub"

setup(
    name='arcros',
    version='0.1.0',
    author='Arc Robotics Team',
    author_email='contact@arcrobotics.dev',
    description='ZMQ-based messaging library for robotics with name-based pub/sub, auto port allocation, and web dashboard',
    long_description=long_description,
    long_description_content_type="text/markdown",
    url='https://github.com/arcrobotics/arcros',
    project_urls={
        'Bug Tracker': 'https://github.com/arcrobotics/arcros/issues',
        'Documentation': 'https://github.com/arcrobotics/arcros#readme',
        'Source Code': 'https://github.com/arcrobotics/arcros',
    },
    packages=find_packages(exclude=['tests', 'tests.*', 'scripts']),
    include_package_data=True,
    install_requires=[
        'pyzmq>=25.0.0',
    ],
    extras_require={
        'web': [
            'fastapi>=0.104.0',
            'uvicorn>=0.24.0',
            'websockets>=12.0',
        ],
        'dev': [
            'pytest>=7.0.0',
            'pytest-cov>=4.0.0',
            'black>=23.0.0',
            'flake8>=6.0.0',
            'mypy>=1.0.0',
        ],
    },
    entry_points={
        'console_scripts': [
            'zmq-monitor=arcros.zmq_monitor.monitor:main',
            'arcros-web=arcros.web.server:run_server',
        ],
    },
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: System :: Networking',
        'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
        'Programming Language :: Python :: 3.10',
        'Programming Language :: Python :: 3.11',
        'Programming Language :: Python :: 3.12',
        'Programming Language :: Python :: 3.13',
        'Operating System :: OS Independent',
    ],
    python_requires='>=3.8',
    keywords='zmq messaging pubsub robotics ros distributed-systems real-time',
    package_data={
        'arcros.web': ['templates/*.html', 'static/*.css', 'static/*.js'],
    },
)