Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple pyproject.toml fixes #251

Merged
merged 4 commits into from
Aug 7, 2022
Merged

Multiple pyproject.toml fixes #251

merged 4 commits into from
Aug 7, 2022

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Aug 7, 2022

  1. Remove the redundant wheel requirement
  2. Remove the incorrect build-time dependencies from requires
  3. Use the correct setuptools backend

Remove the redundant `wheel` dependency, as it is added by the backend
automatically.  Listing it explicitly in the documentation was
a historical mistake and has been fixed since, see:
pypa/setuptools@f7d30a9

Signed-off-by: Michał Górny <[email protected]>
Remove the install-time dependencies from pyproject.toml `requires` key.
This key is used to specify the packages that are needed to build
the wheel, and FWICS none of these packages are actually needed
throughout the run of `setup.py`.  I can also confirm that a pure venv
`python -m build -w` works fine without them.

Signed-off-by: Michał Górny <[email protected]>
Use the regular `setuptools.build_meta` backend rather than
the `__legacy__` backend.  The latter was never meant to be used
explicitly in `pyproject.toml` files but rather as implicit fallback
in tools such as pip(1).  See e.g.:
pypa/setuptools#1689

Signed-off-by: Michał Górny <[email protected]>
Copy link
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed that the resulting requires.txt file in the package remains the same and contains the correct requirements.
This should reduce the amount of dependencies that are installed for builds - but tests will still install the requirements per the test suites.

Thanks!

@di di merged commit 3f28634 into pypa:main Aug 7, 2022
@mgorny mgorny deleted the pyproject-toml-fixes branch August 8, 2022 07:49
@mgorny
Copy link
Contributor Author

mgorny commented Aug 8, 2022

Thanks!

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.

3 participants