#!/usr/bin/env python

# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------


import os
import re

from setuptools import setup, find_packages


# Version extraction inspired from 'requests'
with open(os.path.join("pygen", "_version.py"), "r") as fd:
    version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)  # type: ignore

if not version:
    raise RuntimeError("Cannot find version information")

setup(
    name="pygen",
    version=version,
    include_package_data=True,
    description="Core Library for Python Generation",
    long_description=open("README.md", "r").read(),
    long_description_content_type="text/markdown",
    license="MIT License",
    author="Microsoft Corporation",
    author_email="azpysdkhelp@microsoft.com",
    url="https://github.com/Azure/autorest.python/packages/core",
    classifiers=[
        "Development Status :: 4 - Beta",
        "Programming Language :: Python",
        "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",
        "License :: OSI Approved :: MIT License",
    ],
    packages=find_packages(
        exclude=[
            "test",
        ]
    ),
    install_requires=[
        "black==24.8.0",
        "docutils>=0.20.1",
        "Jinja2==3.1.3",
        "m2r2==0.3.3.post2",
        "PyYAML==6.0.1",
        "tomli==2.0.1",
        "setuptools==69.5.1",
    ],
)
