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

PEP 517 interface (build_meta) should not specify setuptools in build dependencies #1498

Closed
uranusjr opened this issue Sep 20, 2018 · 8 comments
Labels
Needs Discussion Issues where the implementation still needs to be discussed.

Comments

@uranusjr
Copy link
Member

From pypa/pyproject-hooks#15.

Quoting @takluyver’s comment:

I think that what you hit is a bug in the setuptools build backend: I don't think it should be returning the values from build-system.requires at all. The spec says that the get_requires_for_build_* hooks should return:

an additional list of strings containing PEP 508 dependency specifications, above and beyond those specified in the pyproject.toml file

To me, that means that the backend shouldn't include the build-system.requires values, because the frontend should have already found those before calling the hook.

@uranusjr uranusjr changed the title PEP 517 interface (build_meta) should not specify wheel and setuptools and build dependencies PEP 517 interface (build_meta) should not specify wheel and setuptools in build dependencies Sep 20, 2018
@gaborbernat
Copy link
Contributor

gaborbernat commented Sep 20, 2018

Setuptools at the moment does not have a TOML parser. To resolve this though we would need to vendor one into it though. Maybe the build frontend should pass on build requires elements 🤔 but that would be PEP-517 change. @takluyver? @dstufft otherwise now all build frontends need to be able to parse TOML; and need to be able to locate the pyproject.toml.

@takluyver
Copy link
Member

I don't think this needs setuptools to parse TOML. The frontend gets the build-system.requires from the TOML file and installs those. Then it calls the build system to ask for additional build requirements. In setuptools' case, that should be whatever is specified in setup_requires.

@takluyver
Copy link
Member

(Though if setuptools isn't currently reading the TOML file, I must have misunderstood where this issue is coming from)

@gaborbernat
Copy link
Contributor

setuptools does not read the file, so always responds with setuptools and wheel. It's hardcoded. To be able to know what additional it needs to specify it would need to do so though.

@uranusjr
Copy link
Member Author

What happens if setup_requires lists setuptools itself? Does setuptools automatically drop it? What happens if the currently-installed setuptools does not match it?

@pganssle pganssle added the Needs Discussion Issues where the implementation still needs to be discussed. label Oct 19, 2018
@SpecLad
Copy link

SpecLad commented Aug 24, 2021

Wasn't this effectively fixed by #1594? It removed setuptools from the list of build dependencies, and while it didn't remove wheel, I don't think wheel should be removed anyway, as it is a requirement for building wheels.

@jaraco
Copy link
Member

jaraco commented Oct 22, 2021

Interesting. I was previously unaware of these layers. So it seems that any project relying on setuptools and PEP 517/518 automatically gets wheel? And users don't need to specify wheel in the build-system.requires? And they don't even have to download wheel when building an sdist? Even better!

I'm going to close this issue as fixed, but I welcome more discussion if the current implementation isn't satisfactory.

@jaraco jaraco closed this as completed Oct 22, 2021
@jaraco jaraco changed the title PEP 517 interface (build_meta) should not specify wheel and setuptools in build dependencies PEP 517 interface (build_meta) should not specify setuptools in build dependencies Oct 22, 2021
@SpecLad
Copy link

SpecLad commented Oct 23, 2021

And users don't need to specify wheel in the build-system.requires?

I actually found this ticket while I was researching this very question. And my conclusion was that you do need to specify wheel if you want to be compatible with the versions of pip that supported PEP 518, but not PEP 517 (that is, >=10, <19). For pip>=19 it's no longer necessary.

clrpackages pushed a commit to clearlinux-pkgs/jaraco.text that referenced this issue Nov 9, 2021
…on 3.6.0

Alan Fregtman (1):
      .editorconfig: Set max_line_length to 88 for Python files.

Jason R. Coombs (10):
      Rely on setuptools 56 and drop the explicit mention of the license file in favor of simple discovery.
      Remove workaround for python/typed_ast#156.
      Use line continuations to indicate which exclusions are for which workarounds.
      Remove blacken docs as it cannot honor Python's default repr. Ref adamchainz/blacken-docs#62.
      Drop Python 2 compatibility in FoldedCase
      Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51.
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Rely on importlib.resources traversable API. Fixes DeprecationWarning.
clrpackages pushed a commit to clearlinux-pkgs/setuptools that referenced this issue Nov 9, 2021
…on 58.4.0

Alan Fregtman (1):
      .editorconfig: Set max_line_length to 88 for Python files.

Anderson Bravalheri (2):
      Docs: Add reference + short description for Paver
      Remove data_files from declarative config example

Hugo van Kemenade (1):
      Fix typo and add code formatting

Jason R. Coombs (7):
      Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51.
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Drop tests against pip < 20, which no longer work without 'wheel' specified in build requirements.
      Raise a deprecation warning when an invalid version is encountered. Ref #2497. Ref #2822.
      Bump version: 58.3.0 → 58.4.0
clrpackages pushed a commit to clearlinux-pkgs/jaraco.functools that referenced this issue Nov 9, 2021
…version 3.4.0

Alan Fregtman (1):
      .editorconfig: Set max_line_length to 88 for Python files.

Brian Rutledge (1):
      Use shutil for rmtree

Jason R. Coombs (17):
      Remove automerge. Fixes jaraco/skeleton#49.
      Enable dependabot (#50)
      Replace md file with badge linking to documentation site. Fixes jaraco/skeleton#47.
      Test on Python 3.10
      Remove setup_requires, obviated by build-requires in pyproject.toml.
      Suppress deprecation warnings in flake8 and packaging.tags. Ref pypa/packaging#433.
      Rely on setuptools 56 and drop the explicit mention of the license file in favor of simple discovery.
      Remove workaround for python/typed_ast#156.
      Use line continuations to indicate which exclusions are for which workarounds.
      Rewrite doc for clarity.
      Extend doctest
      Remove blacken docs as it cannot honor Python's default repr. Ref adamchainz/blacken-docs#62.
      Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51.
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Use functools.wraps to pass through docstrings in apply.

Sviatoslav Sydorenko (1):
      Make sphinx fail on any warnings (#36)
clrpackages pushed a commit to clearlinux-pkgs/backports.entry_points_selectable that referenced this issue Nov 12, 2021
…version 1.1.0 to version 1.1.1

Alan Fregtman (1):
      .editorconfig: Set max_line_length to 88 for Python files.

Brian Rutledge (1):
      Use shutil for rmtree

Jason R. Coombs (9):
      Rely on setuptools 56 and drop the explicit mention of the license file in favor of simple discovery.
      Remove workaround for python/typed_ast#156.
      Use line continuations to indicate which exclusions are for which workarounds.
      Remove blacken docs as it cannot honor Python's default repr. Ref adamchainz/blacken-docs#62.
      Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51.
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Update changelog.
clrpackages pushed a commit to clearlinux-pkgs/importlib_metadata that referenced this issue Nov 12, 2021
…o version 4.8.2

Alan Fregtman (1):
      .editorconfig: Set max_line_length to 88 for Python files.

Jason R. Coombs (16):
      Pin against broken typing-extensions as reported in python/typing#865. Fixes python/importlib_metadata#350.
      Extract list method passthrough into a factory function.
      Refactor Distribution.files to use pass_none to handle a None value from _read_files*.
      Revert "Pin against broken typing-extensions as reported in python/typing#865. Fixes python/importlib_metadata#350."
      Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51.
      Remove docstring as comment. It's over-specific (pytest-mypy) but also any user of mypy is probably familiar that mypy doesn't handle conditional imports elegantly.
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove references to specific Python versions, as this project and CPython are evolving over time.
      Remove more references to specific Python versions.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Fall back to legacy resolver in pip. Workaround for pypa/pip#9143.
      Restore new resolver for pip. Proper fix for pypa/pip#9143.
      Add test for FastPath on empty path. Ref #353.
      Restore fallback when FastPath.root is empty. Fixes #353.
      Update changelog. Ref #353.
clrpackages pushed a commit to clearlinux-pkgs/portend that referenced this issue Dec 2, 2021
….1.0

Jason R. Coombs (3):
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Require Python 3.7 or later.
      Update changelog.
clrpackages pushed a commit to clearlinux-pkgs/keyring that referenced this issue Dec 2, 2021
…23.3.0

Jason R. Coombs (12):
      Implement tidelift banner using a Sphinx directive implemented by jaraco.tidelift.
      Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51.
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      An initial attempt to skip collection on macOS API module. Doesn't work because mac_ver doesn't work on newer macs with older Pythons. Ref #529.
      Use presence of Security.SecItemAdd to detect viable macOS API. Ref #529.
      Only run macOS backend tests when the backend is viable. Fixes #529. Fixes #547.
      Rename test to match preferred naming convention for macOS.
      Update changelog.
      Add compatibility note for macOS.
      Update changelog to replace 23.2.2 not released.

Kian-Meng, Ang (1):
      Fix typos

wwuck (2):
      Change get_credential to return generic Credential
      Update changelog and bump version.
clrpackages pushed a commit to clearlinux-pkgs/zipp that referenced this issue Jan 4, 2022
Jason R. Coombs (8):
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Fall back to legacy resolver in pip. Workaround for pypa/pip#9143.
      Restore new resolver for pip. Proper fix for pypa/pip#9143.
      Require Python 3.7 or later.
      Remove filtered warnings, addressed upstream.
      Update changelog.
clrpackages pushed a commit to clearlinux-pkgs/jaraco.collections that referenced this issue Jan 4, 2022
…o version 3.5.0

Alan Fregtman (1):
      .editorconfig: Set max_line_length to 88 for Python files.

Jason R. Coombs (10):
      Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51.
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Require Python 3.7 or later.
      Remove filtered warnings, addressed upstream.
      DictStack now supports .items and casting to a dict.
      Remove dependency on more_itertools.
      Add support for DictStack.__contains__.
      Update changelog.
clrpackages pushed a commit to clearlinux-pkgs/pypi-tempora that referenced this issue Jan 17, 2022
…ion 5.0.0

Jason R. Coombs (13):
      Use numeric separators for easier read.
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Require Python 3.7 or later.
      Remove filtered warnings, addressed upstream.
      Remove deprecated divide_timedelta_float and divide_timedelta.
      Remove deprecated Parser.
      Update changelog.
      Add tests capturing missed expectation. Ref #19.
      Replace TypeError with ValueError when the unit is invalid. Ref #19.
      Fix UnreferencedLocalError when nothing matches in the input. Fixes #19.
      Rewrite docs to remove peculiar inputs.
      Update changelog.
clrpackages pushed a commit to clearlinux-pkgs/pypi-pytest_runner that referenced this issue Mar 1, 2022
…o version 6.0.0

Alan Fregtman (1):
      .editorconfig: Set max_line_length to 88 for Python files.

Anderson Bravalheri (1):
      Ignore flake8/black warnings with pytest 7.0.1 (jaraco/skeleton#58)

Brian Rutledge (1):
      Use shutil for rmtree

Evangelos Foutras (1):
      test_egg_fetcher: use newer setuptools on Python 3.10

Jason R. Coombs (35):
      Rebrand to 'For Enterprise'
      Add a 'For Enterprise' section to the README
      Include token passthrough for azure pipelines publish stage.
      Move Tidelift release note publishing to Github Actions.
      Tidelift no longer requires or expects publishing release notes.
      Remove Tidelift from main.yml, no longer needed
      Test on Python 3.10
      Remove setup_requires, obviated by build-requires in pyproject.toml.
      Suppress deprecation warnings in flake8 and packaging.tags. Ref pypa/packaging#433.
      Rely on setuptools 56 and drop the explicit mention of the license file in favor of simple discovery.
      Remove workaround for python/typed_ast#156.
      Use line continuations to indicate which exclusions are for which workarounds.
      Fix syntax issue in changelog. Fixes #58.
      Implement tidelift banner using a Sphinx directive implemented by jaraco.tidelift.
      Remove blacken docs as it cannot honor Python's default repr. Ref adamchainz/blacken-docs#62.
      Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51.
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Require Python 3.7 or later.
      Remove filtered warnings, addressed upstream.
      Update badge year
      Remove setup.py, no longer needed.
      Add exclusions for pytest 7 deprecations in plugins. Fixes jaraco/skeleton#57.
      Use the parent category PytestDeprecationWarning, which is available on older pytest versions. Fixes jaraco/skeleton#57.
      Bump pytest-mypy and remove workaround for realpython/pytest-mypy#131.
      Require jaraco.packaging 9 adding compatibility for projects with no setup.py file.
      Ran pre-commit autoupdate
      🧎‍♀️ Genuflect to the types.
      Update test to install pytest-runner using pip.
      Tests no longer run on Python 3.6
      Update changelog.
      Remove legacy code
      ⚫ Fade to black.
      Move module to package for simplicity of packaging.
jaraco added a commit to jaraco/jaraco.tidelift that referenced this issue Mar 18, 2022
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.classes that referenced this issue Jul 14, 2022
…to version 3.2.2

Alan Fregtman (1):
      .editorconfig: Set max_line_length to 88 for Python files.

Anderson Bravalheri (2):
      Ignore flake8/black warnings with pytest 7.0.1 (jaraco/skeleton#58)
      Update Github actions to v3 (#62)

Brian Rutledge (1):
      Use shutil for rmtree

Hugo van Kemenade (1):
      Update base URL for PEPs (#61)

Jason R. Coombs (52):
      Add Tidelift template
      Rely on alabaster theme to support sidebar rendering.
      Use nicer, simpler phrasing
      Add support for automatic publishing of release notes
      Use technique for environment passing matching that found in jaraco/skeleton
      Move Tidelift token into Travis configuration
      Update badge URL
      Add funding reference to project
      List sidebars to avoid errors looking for template 't'
      Rebrand to 'For Enterprise'
      Add a 'For Enterprise' section to the README
      Include token passthrough for azure pipelines publish stage.
      Move Tidelift release note publishing to Github Actions.
      It's no longer necessary to filter this warning and it's not a warning anymore.
      Bump minimum pytest
      Require twine 3 with keyring unconditionally required.
      Add comments indicating why the exclusions are present
      Exclude mypy on Python 3.10 as workaround for python/typed_ast#156.
      Bump minimums on pytest-checkdocs and pytest-enabler as found on Setuptools.
      Also deny black on Python 3.10 as workaround for python/typed_ast#156.
      Add leading */ to coverage.run.omit. Workaround for pytest-dev/pytest-cov#456.
      Tidelift no longer requires or expects publishing release notes.
      Remove Tidelift from main.yml, no longer needed
      Remove automerge. Fixes jaraco/skeleton#49.
      Enable dependabot (#50)
      Replace md file with badge linking to documentation site. Fixes jaraco/skeleton#47.
      Test on Python 3.10
      Remove setup_requires, obviated by build-requires in pyproject.toml.
      Suppress deprecation warnings in flake8 and packaging.tags. Ref pypa/packaging#433.
      Rely on setuptools 56 and drop the explicit mention of the license file in favor of simple discovery.
      Remove workaround for python/typed_ast#156.
      Use line continuations to indicate which exclusions are for which workarounds.
      Implement tidelift banner using a Sphinx directive implemented by jaraco.tidelift.
      Remove blacken docs as it cannot honor Python's default repr. Ref adamchainz/blacken-docs#62.
      Add intersphinx mappings for Python to prevent spurious nitpicky failures. Fixes jaraco/skeleton#51.
      Test on Python 3.10 (final).
      Rely on pytest 6 and drop workaround for pytest-dev/pytest#6178.
      Remove wheel from build requirements. It's implied for wheel builds. Ref pypa/setuptools#1498.
      Require Python 3.7 or later.
      Remove filtered warnings, addressed upstream.
      Update badge year
      Remove setup.py, no longer needed.
      Add exclusions for pytest 7 deprecations in plugins. Fixes jaraco/skeleton#57.
      Use the parent category PytestDeprecationWarning, which is available on older pytest versions. Fixes jaraco/skeleton#57.
      Bump pytest-mypy and remove workaround for realpython/pytest-mypy#131.
      Require jaraco.packaging 9 adding compatibility for projects with no setup.py file.
      Ran pre-commit autoupdate
      Add Python 3.11 into the matrix using workaround from actions/setup-python#213. Drop 3.9 from matrix for efficiency.
      Prefer spaces for rst. Fixes jaraco/skeleton#64.
      Honor PEP 518 with pytest-enabler.
      Ran pre-commit autoupdate
      Update changelog.

KOLANICH (1):
      Added an .editorconfig. Pull request jaraco/skeleton#43.

Sviatoslav Sydorenko (2):
      Make sphinx fail on any warnings (#36)
      Inject check job into CI workflow as ultimate flag (#55)

wim glenn (1):
      exclude build env from cov reporting (#60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Discussion Issues where the implementation still needs to be discussed.
Projects
None yet
Development

No branches or pull requests

6 participants