from setuptools import setup, find_packages
import os

# Collect all template files recursively
def get_template_files():
    template_files = []
    template_dir = os.path.join('naiogram', 'templates')
    for root, dirs, files in os.walk(template_dir):
        for f in files:
            rel_path = os.path.relpath(os.path.join(root, f), 'naiogram')
            template_files.append(rel_path)
    return template_files

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

setup(
    name="naiogram",
    version="0.1.0",
    author="Naiogram",
    author_email="",
    description="A CLI tool for creating Telegram bot projects with predefined templates",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/naiogram/naiogram",
    packages=find_packages(),
    include_package_data=True,
    package_data={
        'naiogram': get_template_files() or [
            'templates/**/*',
            'templates/**/**/*',
            'templates/**/**/**/*',
            'templates/**/**/**/**/*',
            'templates/**/**/**/**/**/*',
        ]
    },
    install_requires=[],
    entry_points={
        "console_scripts": [
            "naiogram = naiogram.cli:main",
        ],
    },
    license="MIT",
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "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",
        "Topic :: Software Development :: Code Generators",
    ],
    python_requires=">=3.8",
    keywords="telegram bot template cli project generator",
)
