diff --git a/pyproject.toml b/pyproject.toml index 6414b3e..5288b06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,37 @@ +[build-system] +requires = [ + "setuptools >= 64", + "setuptools_scm >= 6.4" +] +build-backend = "setuptools.build_meta" + +[project] +name = "sniffio" +description = "Sniff out which async library your code is running under" +readme = "README.rst" +authors = [{name = "Nathaniel J. Smith", email = "njs@pobox.com"}] +license = {text = "MIT OR Apache-2.0"} +keywords = ["async", "trio", "asyncio"] +classifiers = [ + "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Apache Software License", + "Framework :: Trio", + "Framework :: AsyncIO", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Intended Audience :: Developers", + "Development Status :: 5 - Production/Stable", +] +requires-python = ">= 3.7" +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = {attr = "sniffio._version.__version__"} + [tool.towncrier] package = "sniffio" filename = "docs/source/history.rst" diff --git a/setup.py b/setup.py deleted file mode 100644 index 374839c..0000000 --- a/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -from setuptools import setup, find_packages - -exec(open("sniffio/_version.py", encoding="utf-8").read()) - -LONG_DESC = open("README.rst", encoding="utf-8").read() - -setup( - name="sniffio", - version=__version__, - description="Sniff out which async library your code is running under", - url="https://github.com/python-trio/sniffio", - long_description=LONG_DESC, - author="Nathaniel J. Smith", - author_email="njs@pobox.com", - license="MIT OR Apache-2.0", - packages=find_packages(), - package_data={"sniffio": ["py.typed"]}, - keywords=[ - "async", - "trio", - "asyncio", - ], - python_requires=">=3.7", - tests_require=['curio'], - classifiers=[ - "License :: OSI Approved :: MIT License", - "License :: OSI Approved :: Apache Software License", - "Framework :: Trio", - "Framework :: AsyncIO", - "Operating System :: POSIX :: Linux", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Intended Audience :: Developers", - "Development Status :: 5 - Production/Stable", - ], -)