#!/usr/bin/env python3
"""
Setup script for sing-detector package.
"""

from setuptools import setup, find_packages
import os

# Read README file if it exists
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 f:
        long_description = f.read()
else:
    long_description = "A CLI tool for real-time pitch detection while singing"

# Read requirements
requirements_path = os.path.join(os.path.dirname(__file__), "requirements.txt")
if os.path.exists(requirements_path):
    with open(requirements_path, "r", encoding="utf-8") as f:
        requirements = [line.strip() for line in f if line.strip() and not line.startswith("#")]
else:
    requirements = [
        "numpy>=1.20.0",
        "scipy>=1.7.0",
        "pyaudio>=0.2.11"
    ]

setup(
    name="ashank-pitch",
    version="0.1.0",
    author="Ashank",
    author_email="ashank.behara@gmail.com",
    description="A CLI tool for real-time pitch detection while singing",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://www.ashankbehara.com",
    packages=find_packages(),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Musicians",
        "Topic :: Multimedia :: Sound/Audio :: Analysis",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Operating System :: OS Independent",
    ],
    python_requires=">=3.7",
    install_requires=requirements,
    entry_points={
        "console_scripts": [
            "pitch=sing_detector.main:main",
        ],
    },
    keywords="music pitch detection singing audio real-time CLI",
    project_urls={},
) 