-
Notifications
You must be signed in to change notification settings - Fork 891
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
Support pip wheel
subcommand
#1681
Comments
We have all the plumbing to do this, I'm not sure where it fits on our roadmap though. I'm curious how this would relate to |
Pip would prefer to remove the
|
Thanks for the additional context. I wonder what we can provide for people who want to generate wheels for all their dependencies though. It makes sense for pre-building and sharing when they aren't distributed by the original package. |
I echo this. |
But it doesn’t actually put wheels in the wheelhouse if there’s already a built wheel, IIRC? Pip download will get everything you need then you can loop over any SDists and build them if you need them? |
@henryiii I'm not entirely sure what you mean with that?
Sure. Actually |
That said, |
That's the problem, it does not store wheels that are downloaded. So if you depend on |
That's strange. It is not my understanding of how Now if the purpose is uploading wheels to an index, I'd use |
I’ll investigate, maybe it changed or there’s an another reason it was behaving like that. |
I'd like an
|
Small comment on that one (I do not contest the need for pip wheel of course just explaining how we are doing it in Airflow). I found that you can do quite a bit better than that by just copying the whole Smthing like:
That saves the hassle of running |
Just to second this issue, my pipeline is dependent on the recursive nature of |
I tend to think of
The default is not the most common operation during development, and the functional behaviour provided by None the less, my two cents would be that this shim should not be provided and uv should instead focus on its own dedicated CLI outside of the pip namespace; keeping these two "consumer" and "publisher" pieces separated. |
To second this issue, In our usecase we build the wheel once ( |
FWIW I added a concrete example of how I use pip wheel to #7148 if it's helpful in motivating this feature. |
The command |
The issue is that the new command doesn’t build the dependencies. Neither the local dependencies in the workspace nor the remote dependencies from the package index. |
This would be useful for packaging Blender extensions, which need their dependencies bundled as wheels in a subdirectory: https://docs.blender.org/manual/en/dev/advanced/extensions/python_wheels.html |
This issue is essential to adopt |
This issue has become a blocker for hardened python images, as we use want to use uv in a build step to and then copy over the dependencies into a venv we can't overwrite (Iron Bank images as a concrete example https://repo1.dso.mil/dsop/opensource/python/python313) Similar to other people, I'd like to build reproducible wheels in an environment with dev dependencies (cmake), as the hardened images don't have anything to work with. My workaround has been using uv export to generate a requirements.txt, then pull an ubi9 image to build the wheels, and then load them into the required venv, but this, as you can imagine, is not fun. |
Building on my earlier comments, I'll expand slightly with a concrete workaround. I'm hacking around the lack of this feature right now by using a combination of
You can expand this further, for example I'm doing similar things for other dependency groups independently, or build requirements first,, and I'm not actually using The goal of something like this ticket is that we could just directly use uv build like this |
You can also add |
I've started working on this, please let me know if anyone else is. Most of the plumbing is already there. |
I should note it’d be nice if there was an option to build only the dependencies and not the local packages - and specifically only the dependencies that aren’t in the target destination already similar to how |
I'll need to think about the right way to do this, but my general design idea is:
I'm not sure what's the best way to support installing only dependencies. |
@abhiaagarwal These new proposed options looks great! I may have a novel use case for them btw 😄 Basically, since it would download and build a fully reproducible offline installation talked previously, we can side-load all wheels on a pyapp binary (I have a fork for it) for a simpler solution on entirely offline executables :) My two cents; It would also be nice if we could specify Looking forward for progress on this! 👍🏻 |
Hey, it's great to hear that, there are some of my thoughts about combined version of
As mentioned in examples in there, I think it could be solved by index filtering (May need to have extra index configuration in |
@Tremeschin yeah, that's the thing, pip install / wheel / download are all expressions of the same base concept, except doing slightly different things (ie. wheel is just download, except it also builds if it can't pull a wheel directly from the index). |
@T-256 you read my mind, I was also thinking of the exact nomenclature of It also ties in to a higher-level abstraction of the cache itself, ie |
I'd request a |
You have to build local packages to get the dependency list, though? You can shortcut it in the case of a PEP 621 package without dependencies in the dynamic array, and some backends let you shortcut the build with the get metadata hook, but sometimes you have to build the package to get the deps. |
That dependency information is already in the lock file but otherwise yes you would need to build/discard it to get the metadata if you didn't have a lock file. |
FWIW our use case for You can get a such a list already using |
I've got multiple uses of "pip wheel", one of them is as many others, artifacts for a build or multi-stage pipeline, where we also separate dev dependencies (linters, etc) from real deps, so we can always use the same for child pipelines. Sometimes these end up in a kind of "dev container" that's used as a base, in order to prevent updated packages in repositories from causing new fun issues. The other case is to make sure our internal repo has cached binary builds of certain projects for non x86_64 platforms, fex. lxml, cryptography, etc. So, for that reason, being able to download or build both |
Actually, including wheels you don't "own" is desirable for several use cases, namely for private PyPI-like repositories (e.g. Google Artifact registry, AWS CodeArtifact et al.) at least:
|
I've been trying
uv
on work projects to assess its coverage and suitability of being a fullpip
/pip-tools
replacement for us. One of the features of pip that we use ispip wheel
, which seems to not be supported byuv
currently and I couln't find an open ticket discussing it, so I'm making one here.The text was updated successfully, but these errors were encountered: