Add pyproject.toml, and stop calling setup.py directly#629
Merged
Conversation
what's up with: WARNING: unknown 1.0.0.dev0 does not provide the extra 'dev' why does it think the project's name is "unknown"? why can't it find the "dev" in [project.optional-dependencies]? try upgrading pip and see if that fixes it
…ch we still support
…oblems where an old version doesn't work. Pick the latest version that still supports Python 3.8
…wscrt. We hit some weird cases in "check-docs" CI where an old pip could find the project name in pyproject.toml. Let's avoid future problems by ensuring pip is up to date
This reverts commit 50671f1.
.github/workflows/ci.yml
Outdated
| run: | | ||
| python3 -m pip install --upgrade --requirement requirements-dev.txt | ||
| python3 -m pip install . --verbose | ||
| python3 -m pip install --upgrade pip |
Contributor
There was a problem hiding this comment.
semi related: do we still think upgrading pip is a good idea. i remember we had some issues in the past year with python blocking global pip upgrade in some cases and instead pointing to upgrading pip within venv
Contributor
Author
There was a problem hiding this comment.
I'll try taking these out and see what happens ... and pip failed to build our project, like before.
also tried moving the job to ubuntu-24.04, which would have newer pip ... and that failed too due to formatting errors raised by sphinx.
The docs are sadly very fragile. Seem to only work with certain sphinx-versions combined with certain python-versions. Don't have time to diagnose. Just making it work for now :(
DmitriyMusatkin
approved these changes
Mar 13, 2025
maybe this was superstition, maybe declaring a min version of setuptools was the real fix to the problems I was seeing
not sure why install fails without pip upgrade not sure why sphinx fails with newer ubuntu
…Add TODO about fixing it.
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.
Issue:
For a few years now, we've been seen the occasional deprecation warning about setup.py. Including:
and
2025-Oct is on its way, so let's finally do something about it...
Description of changes:
Follow advice from "Is setup.py deprecated?" page at packaging.python.org
tldr; having a setup.py file is not deprecated, but directly invoking
python setup.pyis deprecated.setup.py->pyproject.tomlwherever possible (can't move dynamic stuff, like build steps for C extension)requirements-dev.txt->pyproject.toml [project.optional-dependencies]pip install ".[dev]", instead ofpip install -r requirements-dev.txt. The dev dependencies will be installed by the same command that builds and installs our project.python3 -m buildinstead ofpython3 setup.py sdist bdist_wheel(the modern way to build a wheel for distribution)buildinstalled for all python versions, so our release process should be OK.pip install --upgrade setuptoolsbeforepip install .pyproject.toml(setuptools & wheel) in a special isolated environment before it builds our project. We declaredsetuptools>=75.3.1, so we're guaranteed it will get installed, and be a recent version.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.