Skip to content

Comments

feat: support pip packages for no-build-isolation#4247

Merged
tdejager merged 11 commits intoprefix-dev:mainfrom
Hofer-Julian:feature/pix-59-support-pip-packages-for-no-build-isolation
Aug 4, 2025
Merged

feat: support pip packages for no-build-isolation#4247
tdejager merged 11 commits intoprefix-dev:mainfrom
Hofer-Julian:feature/pix-59-support-pip-packages-for-no-build-isolation

Conversation

@Hofer-Julian
Copy link
Contributor

@Hofer-Julian Hofer-Julian commented Jul 31, 2025

Fixes #3223

The problem was that PyPI packages were not necessarily built when needed for other PyPI packages with no-build-isolation. This PR splits the installation in two-step:

  • Install all packages without no-build-isolation
  • Install no-build-isolation packages one by one

This should make a few use cases possible that were unrelieable before

@lucascolley lucascolley added enhancement New features pypi Issue related to PyPI dependencies labels Jul 31, 2025
@Hofer-Julian Hofer-Julian marked this pull request as ready for review August 1, 2025 14:16
@Hofer-Julian Hofer-Julian requested a review from tdejager August 4, 2025 06:36
@tdejager
Copy link
Contributor

tdejager commented Aug 4, 2025

Looking good, would you be able to document this behavior somewhere :)?

@tdejager
Copy link
Contributor

tdejager commented Aug 4, 2025

@pablovela5620 I believe a package that is causing a lot of problems is flash-attn do you think it makes sense to document building this somewhere?

@Hofer-Julian
Copy link
Contributor Author

Looking good, would you be able to document this behavior somewhere :)?

Done!

@tdejager tdejager added the test:extra_slow Run the extra slow tests label Aug 4, 2025
Copy link
Contributor

@tdejager tdejager left a comment

Choose a reason for hiding this comment

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

Nice. Thanks for picking this up @Hofer-Julian, let's merge after tests succeed.

@tdejager tdejager self-requested a review August 4, 2025 11:19
@tdejager tdejager enabled auto-merge (squash) August 4, 2025 11:19
@tdejager tdejager merged commit 8651c4a into prefix-dev:main Aug 4, 2025
41 checks passed
charliermarsh added a commit to astral-sh/uv that referenced this pull request Aug 15, 2025
## Summary

This PR productionizes an idea I saw in
#15248, which was added in Pixi:
prefix-dev/pixi#4247. The core of the idea is
that if we install all build isolation-enabled packages first, and the
build isolation-disabled packages in a second phase, the sync is more
likely to "just work", because if all the build dependencies of the
build isolation-disabled packages are included as dependencies (as is
the case for `flash-attn`, at least), they'll be present.

This isn't really a silver bullet, because it requires that all the
build dependencies are included as first-party dependencies, and if you
have packages that want build isolation to be disabled but rely on other
packages that also require build isolation disabled, that won't work
either. I think `extra-build-dependencies` will be more robust and have
much better caching behavior, but this will get more cases right than
our current behavior, and I don't see any downsides.

Closes #15301.
@Hofer-Julian Hofer-Julian deleted the feature/pix-59-support-pip-packages-for-no-build-isolation branch December 9, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New features pypi Issue related to PyPI dependencies test:extra_slow Run the extra slow tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support pip packages for --no-build-isolation

3 participants