Remove setup.py and setup.cfg, which no longer do anything - #75
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.cfgheld only:pyproject.tomlnow supplies that through PEP 639license = "MIT"andlicense-files. I built the wheel with and without the file and compared the metadata:setup.pywas a baresetup()call.pyproject.tomldeclaresbuild-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.pyis editable installs, which CI uses in five jobs andbuild.shuses too. So I exercised each path in a clean venv, installing with the[icons]extra and drawing an icon chart:pip install -e ".[icons]"pip install ".[icons]"from the treePlus
python -m buildandtwine checkon both artifacts with identical metadata, and the full suite (234 tests).Two notes
Editable installs without
setup.pyuse PEP 660, which needs pip 21.3 or newer. Every CI job gets pip fromactions/setup-python, which is far past that, andbuild.shrunspip install --upgrade pipfirst.The sdist still contains a
setup.cfg, but it is not this one. setuptools generates its own during the sdist build: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.