diff --git a/newsfragments/33.feature.rst b/newsfragments/33.feature.rst new file mode 100644 index 0000000..508e13b --- /dev/null +++ b/newsfragments/33.feature.rst @@ -0,0 +1 @@ +Moved the metadata into ``PEP 621``-compliant ``pyproject.toml``. diff --git a/pyproject.toml b/pyproject.toml index ecd1160..64cf62a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,44 @@ [build-system] -requires = ["setuptools>=42.2", "setuptools_scm[toml]>=3.4.3"] +requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.3"] build-backend = "setuptools.build_meta" +[project] +name = "sniffio" +authors = [{name = "Nathaniel J. Smith", email = "njs@pobox.com"}] +license = {text = "MIT OR Apache-2.0"} +description = "Sniff out which async library your code is running under" +readme = "README.rst" +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", +] +urls = {Homepage = "https://github.com/python-trio/sniffio"} +requires-python = ">=3.7" +dynamic = ["version"] + +[project.optional-dependencies] +testing = ["curio"] + +[tool.setuptools] +include-package-data = false + +[tool.setuptools.packages] +find = {namespaces = false} + +[tool.setuptools.package-data] +sniffio = ["py.typed"] + [tool.setuptools_scm] write_to = "sniffio/_version.py" write_to_template = "__version__ = \"{version}\"\n" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 757d144..0000000 --- a/setup.cfg +++ /dev/null @@ -1,30 +0,0 @@ -[metadata] -name = sniffio -author = Nathaniel J. Smith -author_email = njs@pobox.com -license = MIT OR Apache-2.0 -description = Sniff out which async library your code is running under -long_description = file: README.rst -keywords = async, trio, asyncio -url = https://github.com/python-trio/sniffio -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 - -[options] -packages = find: -python_requires = >=3.7 -tests_require = curio - -[options.package_data] -sniffio = py.typed