#!/usr/bin/env python
"""
Setup script for the FMUS-VID package.
"""

import os
from setuptools import setup, find_packages

# Read the contents of README file
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

# Core dependencies
REQUIRES = [
    'opencv-python>=4.5.0',
    'numpy>=1.19.0',
    'Pillow>=8.0.0',
    'tqdm>=4.50.0',
    'pydantic>=1.8.0',
]

# Optional dependencies
EXTRAS_REQUIRE = {
    'ai': [
        'torch>=1.9.0',
        'torchvision>=0.10.0',
        'ultralytics>=8.0.0',  # YOLOv8
        'faster-whisper>=0.5.0',  # Speech recognition
    ],
    'streaming': [
        'ffmpeg-python>=0.2.0',
        'av>=9.0.0',  # PyAV
    ],
    'gui': [
        'PyQt6>=6.3.0',
    ],
    'dev': [
        'pytest>=6.0.0',
        'pytest-cov>=2.10.0',
        'black>=21.5b2',
        'isort>=5.9.0',
        'flake8>=3.9.0',
        'mypy>=0.800',
    ],
}

# All extras
EXTRAS_REQUIRE['all'] = list(set(sum(EXTRAS_REQUIRE.values(), [])))

setup(
    name='fmusvid',
    version='0.0.1',
    description='A Python video processing library',
    long_description=long_description,
    long_description_content_type='text/markdown',
    license='MIT',
    author='Yusef Ulum',
    author_email='yusef314159@gmail.com',
    url='https://github.com/mexyusef/fmusvid',
    packages=find_packages(exclude=['tests', 'examples']),
    install_requires=REQUIRES,
    extras_require=EXTRAS_REQUIRE,
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
        'Programming Language :: Python :: 3.10',
        'Topic :: Multimedia :: Video',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
    python_requires='>=3.8',
    keywords='video, processing, editing, capture, webcam, ai, streaming',
    project_urls={
        'Documentation': 'https://fmusvid.readthedocs.io',
        'Source': 'https://github.com/mexyusef/fmusvid',
        'Tracker': 'https://github.com/mexyusef/fmusvid/issues',
    },
    entry_points={
        'console_scripts': [
            'fmusvid=fmusvid.cli.main:main',
        ],
    },
)
