Repository navigation
Makefile: build dists with python -m build, drop setup.py upload - #2359
Open
jorgeecardona wants to merge 1 commit into
Open
jorgeecardona wants to merge 1 commit into
jorgeecardona wants to merge 1 commit into
Conversation
`python setup.py sdist` and `bdist_wheel` are the deprecated direct invocation; setuptools prints "please avoid running setup.py directly" on every build. Replace them with `python -m build --sdist` and `--wheel`. Output is identical: same sdist file list and PKG-INFO, same py2.py3-none-any wheel and METADATA, checked on 3.8 and 3.9. SKIP_GIT_SDIST was a pbr variable and pbr was replaced by setuptools_scm, so it goes. `setup.py upload` was removed in setuptools 42 (2019), so pypi-publish has not worked since. Releases go through gh-action-pypi-publish in release.yml, so remove the target and its `pypi` alias rather than keep an untested manual path. build is pinned to 1.2.2.post1 because 1.3 dropped Python 3.8, which CI still runs. pyproject.toml has no [build-system] table yet, so build uses setuptools' legacy fallback plus setup_requires; that table is a separate change. Re-locking with pipenv 2024.4 also records exceptiongroup, backports.tarfile, importlib-metadata and zipp, which are marker-conditional deps of pytest, jaraco.context, twine and build. No existing pin changed.
There was a problem hiding this comment.
🟢 Approval recommended
The focused packaging changes are consistent and the linked CI passed across Python 3.8–3.11.
0 open findings
What changed in this PR
Modernizes distribution builds while retaining the existing setuptools backend and Python 3.8 compatibility.
Changes:
- Uses
python -m buildfor source and wheel distributions. - Removes obsolete
setup.py uploadtargets. - Adds and locks the compatible build frontend dependencies.
| File | Description |
|---|---|
Makefile |
Modernizes distribution commands and removes obsolete publishing targets. |
Pipfile |
Adds the Python 3.8-compatible build dependency. |
Pipfile.lock |
Locks build and its transitive dependencies. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
setup.py sdist/bdist_wheelare the deprecated direct invocation; nowpython -m build --sdist/--wheel. Sdist and wheel contents and metadata are identical, checked on 3.8 and 3.9.SKIP_GIT_SDISTwas a pbr variable, so it goes.setup.py uploadwas removed in setuptools 42 (2019), somake pypi-publishhas been broken since;release.ymlpublishes via gh-action-pypi-publish. The target and itspypialias are removed.buildpinned to 1.2.2.post1 (1.3 dropped 3.8). Lock relocked with pipenv 2024.4.0 (CI's version): gainsbuild,pyproject-hooksand four marker-conditional deps of existing packages; no existing pin changed.Backend stays setuptools.
pyproject.tomlhas no[build-system]yet, so build uses the legacy fallback; that table is #2355's job.CI on my fork: https://github.com/jorgeecardona/guake/actions/runs/38175686055