[BE]: Add PEP621 project section to pyproject.toml#153055
[BE]: Add PEP621 project section to pyproject.toml#153055Skylion007 wants to merge 10 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/153055
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit eb3b4d3 with merge base d22c403 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
What is this file used for? |
It's used for resolving metadata in build-backend agnostic way. In this case, it just dispatches those resolutions to setuptools/wheel builtin metadata. This allows using more features of modern tooling like It also provides a standard way of getting project wide settings for various tooling/linters (ie ruff, black, and isort will now autodetect the minimum supported Python version from this python-requires field and setuptools will now also enforce it even without hitting syntax errors for unsupported syntax in imports etc). See https://peps.python.org/pep-0621/ for more info |
c42dbb3 to
0280085
Compare
pyproject.toml
Outdated
There was a problem hiding this comment.
These values are now inferred from requires-python
0280085 to
f5bff4f
Compare
pyproject.toml
Outdated
There was a problem hiding this comment.
These are filled from reading the logs / warnings from uv
There was a problem hiding this comment.
In a follow up PR I can migrate the static fields from setuptools to the pyproject.toml, setuptools will then automatically popuate them from the pyproject.toml
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 2 checks: pull / linux-focal-py3.13-clang10 / test (dynamo_wrapped, 3, 3, ephemeral.linux.2xlarge), pull / linux-focal-py3.9-clang10 / test (dynamo_wrapped, 2, 3, ephemeral.linux.2xlarge) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
c0156e8 to
f282d78
Compare
…tize (#153244) Unblocks #153055 and ensure that matplotlib should always be optional in PyTorch. Pull Request resolved: #153244 Approved by: https://github.com/albanD
f282d78 to
0c6ca59
Compare
6d64f35 to
f9cf974
Compare
f94d4ce to
63e7507
Compare
63e7507 to
792a4b9
Compare
Figured it out, it's a change in semantics of setuptools which allows namespace packages to be found by default. Hence, all these files had broken Python files under minimum requirements / import and are now getting flagged. |
fc881d4 to
eb3b4d3
Compare
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Follow up to @ezyang's PR #153020 , but better uses PEP621 to reduce redundant fields and pass through metadata better to uv, setuptools, poetry and other tooling.
These also clearly shows us what fields will need to be migrated to pyproject.toml over time from setup.py per #152276. Static fields be fairly easy to migrate, the dynamically built ones like requirements are a bit more challenging.
Without this,
uv synccomplains:cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k