#!/usr/bin/env python3
"""
Setup script for DooPourd - Verilog Parser and Circuit Diagram Generator
Official PyPI Package
"""

from setuptools import setup, find_packages
from pathlib import Path

# Read README
README_FILE = Path(__file__).parent / "README.md"
if README_FILE.exists():
    README = README_FILE.read_text(encoding="utf-8")
else:
    README = "Verilog Parser and Circuit Diagram Generator"

setup(
    name="DooPourd",
    version="0.7.0",
    author="vesper",
    author_email="vesper.oneold@gmail.com",
    description="Parse Verilog code and generate circuit diagrams - Professional HDL Analysis Framework",
    long_description=README,
    long_description_content_type="text/markdown",
    url="https://github.com/Dev-vesper/DooPourd",
    project_urls={
        "Bug Tracker": "https://github.com/Dev-vesper/DooPourd/issues",
        "Documentation": "https://github.com/Dev-vesper/DooPourd/blob/main/README.md",
        "Source Code": "https://github.com/Dev-vesper/DooPourd",
    },
    packages=find_packages(exclude=["tests", "examples"]),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
        "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",
        "Operating System :: OS Independent",
    ],
    python_requires=">=3.8",
    install_requires=[
        # No external dependencies required for core parsing!
    ],
    extras_require={
        "graph": ["graphviz>=0.20"],
        "circuit": ["cairosvg>=2.5.0", "graphviz>=0.20"],
        "dev": [
            "pytest>=7.0",
            "pytest-cov>=3.0",
            "black>=22.0",
            "flake8>=4.0",
        ],
        "all": ["graphviz>=0.20", "cairosvg>=2.5.0"],
    },
    entry_points={
        "console_scripts": [
            "doopould=examples.cli:main",
        ],
    },
    include_package_data=True,
    zip_safe=False,
    keywords=[
        "verilog",
        "parser",
        "circuit",
        "diagram",
        "hdl",
        "hardware",
        "visualization",
        "ast",
        "lexer",
        "eda",
    ],
)
