From 6d9c7b756486a654e795095d393bf8206cd11dea Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 21 Jan 2025 08:27:37 +0100 Subject: [PATCH] Move metadata to pyproject + drop Python 3.7 (#53) Co-authored-by: Ran Benita --- .github/workflows/test.yml | 11 +++++------ MANIFEST.in | 7 ++++++- pyproject.toml | 34 ++++++++++++++++++++++++++++++++ setup.cfg | 2 -- setup.py | 40 -------------------------------------- tox.ini | 4 ++-- 6 files changed, 47 insertions(+), 51 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 206d3af..7168992 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ permissions: {} jobs: lint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest timeout-minutes: 10 permissions: contents: read @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 @@ -37,7 +37,7 @@ jobs: run: tox -e lint test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest timeout-minutes: 10 permissions: contents: read @@ -46,19 +46,18 @@ jobs: fail-fast: false matrix: python: [ - "3.7.1", - "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", + "3.13", ] steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} allow-prereleases: true diff --git a/MANIFEST.in b/MANIFEST.in index 1aba38f..d0bc2e5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,6 @@ -include LICENSE +# files necessary for testing sdist +graft tests +include tox.ini + +global-exclude *.py[cod] +global-exclude .DS_Store diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1e24d57 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,34 @@ +[build-system] +requires = ["setuptools>=75.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "mypy_extensions" +version = "1.0.0-dev" +description = "Type system extensions for programs checked with the mypy type checker." +readme = "README.md" +authors = [ + {name = "The mypy developers", email = "jukka.lehtosalo@iki.fi"} +] +license = {text = "MIT"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "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", + "Programming Language :: Python :: 3.13", + "Topic :: Software Development", +] +requires-python = ">=3.8" + +[project.urls] +Homepage = "https://github.com/python/mypy_extensions" + +[tool.setuptools] +py-modules = ["mypy_extensions"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index aa76bae..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=0 diff --git a/setup.py b/setup.py deleted file mode 100644 index 259d058..0000000 --- a/setup.py +++ /dev/null @@ -1,40 +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.7', - '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', -] - -setup( - name='mypy_extensions', - python_requires='>=3.7', - 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, -) diff --git a/tox.ini b/tox.ini index d62caa1..3412839 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] -minversion = 2.9.1 +minversion = 4.4.4 skip_missing_interpreters = true -envlist = py37, py38, py39, py310, py311, py312 +envlist = py38, py39, py310, py311, py312, py313 [testenv] description = run the test driver with {basepython}