From fb504bf6c774b112392196bc91aea3f1261f5e33 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 7 Jul 2023 21:42:52 +0300 Subject: [PATCH] Modernize packaging a bit Adding pyproject.toml allows the package to be installed using PEP517 instead of legacy `setup.py install` method. At least pip says so in a warning when installing without the `wheel` package available. Change setup.py to setup.cfg (using a script[0]) because setup.py is out of fashion these days. Remove MANIFEST.ini since LICENSE is implied[1]. [0] https://github.com/gvalkov/setuptools-py2cfg [1] https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-license-files --- MANIFEST.in | 1 - pyproject.toml | 3 +++ setup.cfg | 34 ++++++++++++++++++++++++++++++++-- setup.py | 41 ----------------------------------------- 4 files changed, 35 insertions(+), 44 deletions(-) delete mode 100644 MANIFEST.in create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 1aba38f..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -include LICENSE diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index aa76bae..e020e86 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,32 @@ -[bdist_wheel] -universal=0 +[metadata] +name = mypy_extensions +version = 1.0.0-dev +author = The mypy developers +author_email = jukka.lehtosalo@iki.fi +license = MIT License +description = Type system extensions for programs checked with the mypy type checker. +url = https://github.com/python/mypy_extensions +long_description = Mypy Extensions + =============== + + The "mypy_extensions" module defines extensions to the standard "typing" module + that are supported by the mypy type checker and the mypyc compiler. + +classifiers = + Development Status :: 5 - Production/Stable + Environment :: Console + Intended Audience :: Developers + License :: OSI Approved :: MIT License + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Topic :: Software Development + +[options] +py_modules = mypy_extensions +python_requires = >=3.5 diff --git a/setup.py b/setup.py deleted file mode 100644 index 0a13ba3..0000000 --- a/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -from setuptools import setup - -version = '1.0.0-dev' -description = 'Type system extensions for programs checked with the mypy type checker.' -long_description = ''' -Mypy Extensions -=============== - -The "mypy_extensions" module defines extensions to the standard "typing" module -that are supported by the mypy type checker and the mypyc compiler. -'''.lstrip() - -classifiers = [ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Topic :: Software Development', -] - -setup( - name='mypy_extensions', - python_requires='>=3.5', - version=version, - description=description, - long_description=long_description, - author='The mypy developers', - author_email='jukka.lehtosalo@iki.fi', - url='https://github.com/python/mypy_extensions', - license='MIT License', - py_modules=['mypy_extensions'], - classifiers=classifiers, -)