"""
Backward compatible setup.py for older pip versions
For modern installations, pyproject.toml is used
"""

from setuptools import setup, find_packages
import os

# Read version
version = {}
with open("src/quantfolio/__version__.py") as f:
    exec(f.read(), version)

# Read README
with open("README.md", "r", encoding="utf-8") as f:
    long_description = f.read()

setup(
    name="quantum-portfolio-opt",
    version=version["__version__"],
    description="Hybrid Quantum-Classical Portfolio Optimization with IBM Qiskit",
    long_description=long_description,
    long_description_content_type="text/markdown",
    author="Quantfolio Team",
    license="MIT",
    packages=find_packages(where="src"),
    package_dir={"": "src"},
    python_requires=">=3.9",
    install_requires=[
        "qiskit>=2.0.0",
        "qiskit-aer>=0.13.0",
        "qiskit-algorithms>=0.4.0",
        "qiskit-optimization>=0.7.0",
        "torch>=2.0.0",
        "pandas>=2.0.0",
        "numpy>=1.24.0",
        "yfinance>=0.2.0",
        "scipy>=1.10.0",
        "scikit-learn>=1.3.0",
        "matplotlib>=3.7.0",
        "seaborn>=0.12.0",
        "cvxpy>=1.4.0",
        "tqdm>=4.66.0",
    ],
    extras_require={
        "dev": ["pytest>=7.0", "black>=23.0", "flake8>=6.0", "mypy>=1.0"],
        "notebooks": ["jupyter>=1.0.0", "notebook>=7.0.0", "ipykernel>=6.0.0"],
    },
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Financial and Insurance Industry",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
    ],
    keywords="quantum portfolio optimization finance qiskit machine-learning QAOA",
)
