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

vendored apps w sdist: install common build deps in staging #922

Merged
merged 1 commit into from
May 30, 2024

Conversation

arjun024
Copy link
Member

sdist packages have 2 kinds of dependencies: build-time deps and runtime-deps. Before PEP-517, there was no standard to specify a package's build-time deps, but with PEP-517, a package defines its build-time deps in its pyproject.toml.

In an online install, pip reads it and downloads build-time deps and builds the sdist. In a vendored (offline) install, this is not possible because "pip download" is not smart enough to download build-time deps during vendoring (pypa/pip/issues/8302).

Before pip 23.1, when build-time deps were missing, pip fell back to using the legacy 'setup.py install' method. pip 23.1 removed this fallback and started enforcing PEP 517. Therefore, for vendored apps with sdists, we install the 2 most common build-time dependencies - wheel and setuptools. These are packaged by the dependency pipeline within the "pip" dependency.

@arjun024 arjun024 requested a review from a team as a code owner May 30, 2024 17:05
@arjun024 arjun024 force-pushed the vendored-apps-pre-pep-517 branch from d426982 to 294a646 Compare May 30, 2024 17:07
@arjun024 arjun024 linked an issue May 30, 2024 that may be closed by this pull request
3 tasks
@arjun024 arjun024 marked this pull request as draft May 30, 2024 17:42
sdist packages have 2 kinds of dependencies: build-time deps and
runtime-deps. Before PEP-517, there was no standard to specify a package's
build-time deps, but with PEP-517, a package defines its build-time deps in
its pyproject.toml.

In an online install, pip reads it and downloads build-time deps and
builds the sdist. In a vendored (offline) install, this is not possible
because "pip download" is not smart enough to download build-time deps
during vendoring (github.com/pypa/pip/issues/8302).

Before pip 23.1, when build-time deps were missing, pip fell back to
using the legacy 'setup.py install' method. pip 23.1 removed this
fallback and started enforcing PEP 517 (https://discuss.python.org/t/announcement-pip-23-1-release/25844).
Therefore, for vendored apps with sdists, we install the 2 most common
build-time dependencies - wheel and setuptools. These are packaged by
the dependency pipeline within the "pip" dependency.
@arjun024 arjun024 force-pushed the vendored-apps-pre-pep-517 branch from 294a646 to 315eee3 Compare May 30, 2024 19:20
@arjun024 arjun024 marked this pull request as ready for review May 30, 2024 19:43
Copy link
Member

@robdimsdale robdimsdale left a comment

Choose a reason for hiding this comment

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

Excellent sleuthing! 🕵️

@robdimsdale robdimsdale merged commit 0ae2aab into develop May 30, 2024
7 checks passed
@robdimsdale robdimsdale deleted the vendored-apps-pre-pep-517 branch May 30, 2024 21:42
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.

Staging fails with vendored dependencies in > 1.8.9
2 participants