Skip to content

Remove setup.py now that the floor is Python 3.8 #2061

Closed

Description

@JarryShaw

Is your feature request related to a problem?
After #2053, setup.py is just a Python 2 guard and a bare setup(). Nothing needs it. Measured on 3.14 (setuptools 84) and 3.8 (setuptools 75):

  • Wheels: byte-identical with and without the file, from both python -m build and pip wheel. The METADATA, entry points and Requires-Python all match.
  • sdist: it differs only by setup.py itself and SOURCES.txt.
  • Editable installs: pip install -e . works through PEP 660.
  • 3.7: the refusal is identical without the file: requires a different Python: 3.7.16 not in '>=3.8'.
  • Python 2 guard: pip on 2.7 fails on the setuptools>=62.3.0 build requirement before it would ever reach setup.py.
  • No callers: no workflow, Makefile target or conda script calls setup.py. They all use pip install or python -m build.

Change:

  • Delete: setup.py and tests/project/test_setup.py, replacing the test with a guard that fails if a setup.py reappears.
  • Fix examples/benchmark/Dockerfile: its COPY pyproject.toml setup.py … would fail on the missing file.
  • Rewrite stale prose: the pyproject.toml comment about Dependabot's stub setup.py, and the docstrings in test_actions_pinned_1968.py. Dependabot falls back to pyproject.toml when setup.py is absent.
  • Changelog: add an entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreMaintenance work: tooling, repo hygiene, no library behaviour changepythonPull requests that update Python code

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions