Skip to content

Remove setup.py and setup.cfg, which no longer do anything - #75

Merged
gyli merged 1 commit into
masterfrom
chore/remove-dead-packaging-files
Sep 17, 2026
Merged

gyli merged 1 commit into
masterfrom
chore/remove-dead-packaging-files

Conversation

@gyli

@gyli gyli commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Packaging moved to PEP 621 in pyproject.toml. These two files stayed behind and no longer do anything. Nothing in the repository references either of them.

setup.cfg held only:

[metadata]
license_files = LICENSE

pyproject.toml now supplies that through PEP 639 license = "MIT" and license-files. I built the wheel with and without the file and compared the metadata:

with setup.cfg     -> License-Expression: MIT, License-File: LICENSE
without setup.cfg  -> License-Expression: MIT, License-File: LICENSE

setup.py was a bare setup() call. pyproject.toml declares build-backend = "setuptools.build_meta" and [tool.setuptools] packages, so nothing reads it.

Verified every install path, not just the build

The risk with deleting setup.py is editable installs, which CI uses in five jobs and build.sh uses too. So I exercised each path in a clean venv, installing with the [icons] extra and drawing an icon chart:

path result
pip install -e ".[icons]" drew 50 icons
wheel drew 50 icons
sdist drew 50 icons
pip install ".[icons]" from the tree drew 50 icons

Plus python -m build and twine check on both artifacts with identical metadata, and the full suite (234 tests).

Two notes

Editable installs without setup.py use PEP 660, which needs pip 21.3 or newer. Every CI job gets pip from actions/setup-python, which is far past that, and build.sh runs pip install --upgrade pip first.

The sdist still contains a setup.cfg, but it is not this one. setuptools generates its own during the sdist build:

[egg_info]
tag_build =
tag_date = 0

I checked this after noticing the file still appeared in the archive listing. Worth recording so nobody deletes ours a second time thinking it did not take.

Packaging moved to PEP 621 in pyproject.toml. What was left behind:

setup.cfg held only `[metadata] license_files = LICENSE`, which pyproject now supplies
through PEP 639 `license` and `license-files`. Built the wheel with and without the file:
the License-Expression and License-File metadata are identical either way.

setup.py was a bare `setup()` call. pyproject declares the build backend and the package
list, so nothing reads it. Nothing in the repository referenced either file.

Verified every install path rather than only the build: editable (what CI and build.sh
use), wheel, sdist, and `pip install .` from the tree, each drawing an icon chart in a
clean venv. Also `python -m build` and `twine check` on both artifacts, with metadata
unchanged, and the full suite.

Editable installs without a setup.py use PEP 660, which needs pip 21.3 or newer. Every
CI job gets pip from actions/setup-python, which is far past that.
@gyli
gyli merged commit 877b72a into master Sep 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant