-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Simplify vendoring and declare dependencies optionally #4457
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
62bd80f
Declare the dependencies and update vendoring routine for setuptools …
jaraco e9bb687
Specify environment-conditional transitive deps.
jaraco d4352b5
Import dependencies naturally and ensure they're available by appendi…
jaraco 00384a5
Re-vendor setuptools packages.
jaraco 3ed7e27
Remove importlib_metadata workaround.
jaraco f21bcab
Remove setuptools.extern
jaraco bd5cf00
Remove check-extern env in tox.
jaraco 9234fc3
Update vendoring routine for pkg_resources to simply install the depe…
jaraco d03cd0e
Import dependencies naturally and ensure they're available by appendi…
jaraco c6913bf
Re-vendor pkg_resources packages.
jaraco 51615db
Remove obsolete 'rewrite' functionality from vendored script.
jaraco b4b6bf7
Update auto-detect the minimum python version needed for vendored pac…
jaraco 4f6d973
Refresh vendored dependencies.
jaraco 8b4b9d0
Consolidate vendored packages in the setuptools package.
jaraco 1523957
Remove pkg_resources.extern.
jaraco c4086b9
Clean up references to extern modules.
jaraco ed15a3b
Add news fragment.
jaraco cb4b670
Suppress type errors around wheel.
jaraco e7c320b
Fix type error in vendored tool.
jaraco 3fd66b9
Fix incorrect type declaration in _python_requires.
jaraco bb17215
Fix type errors in pkg_resources, now that packaging types are recogn…
jaraco 242ef24
Suppress coverage errors.
jaraco d25f6d9
Moved the dependencies to a 'core' extra to avoid dangers with cyclic…
jaraco fa7ee91
Ensure that package data from vendored packages gets installed.
jaraco a2a64ec
Explicitly declare the 'core' extra as 'for informational purposes'
jaraco 225f7fe
Rewrite marker evaluation to address two type check failures.
Avasam 0e1e707
Update `Requirement.__contains__` type spec to accept `UnparsedVersion`.
Avasam 930ebe5
Rely on os.path.join and os.path.dirname when adding the vendored pat…
jaraco 9eb89de
Resolve a version from an item, addressing missed `arg-type` check.
jaraco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Now setuptools declares its own dependencies in the ``core`` extra. Dependencies are still vendored for bootstrapping purposes, but setuptools will prefer installed dependencies if present. The ``core`` extra is used for informational purposes and should *not* be declared in package metadata (e.g. ``build-requires``). Downstream packagers can de-vendor by simply removing the ``setuptools/_vendor`` directory. |
This file contains 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
9 changes: 0 additions & 9 deletions
9
pkg_resources/_vendor/backports.tarfile-1.0.0.dist-info/RECORD
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hack breaks when this package is within a zip file... pypa/virtualenv#1727 cc @jaraco
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to hear that.
It's not fair to characterize this as a hack. It's the vendoring approach, which is required by the ecosystem to satisfy PEP 517's "no circular build dependencies" constraint. Setuptools is following best-available standards for supplying sophisticated behavior. There's a lot of work going on in pypa/packaging-problems#342 to solve the issue more holistically so that build backends can have and declare proper dependencies.
When I first authored this change, I considered the zipimport case and thought that this approach might work for the zipimport case but I never verified.
Since the release of this change, the vendoring support is there as a fallback for environments that cannot include the dependencies naturally. The best approach would be for the app/environment builder to ensure that
setuptools[core]
is installed (such that vendoring is unnecessary).I'd be open to expanding the vendoring support to support better the zipimport case. I'll open an issue about it.