-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Supporting adding extra
annotations to the exported requirements
file
#2519
Comments
Can you explain more on how the extra info is used? Given this requirements
Note all other transitive dependencies are also exported but omitted. Why does Because from the perspective of an installer, there is not any difference between whether you use the extras tag, or specify the extra dependencies manually. |
Right now it only needs the second entry, but we can handle a requirements file with both entries. To be concrete, filegroup(name="whl", src=["pydantic-...-any.whl"])
py_library(
name = "pkg",
srcs = [
# All of the extracted whl contents
],
deps = [
# deps for the python sources. Only dependencies for the requested extras are included
# which means that `pydantic==1.8.2` would yield a subset of dependencies and
# `pydantic[email]==1.8.2` would yield the correct set of deps
]
) The
In the ideal case, we should consume Let me know if you'd like to know more details or if the text above is a little too detailed/confusing. |
But exported requirements should contain all transitive dependencies, so even it parses |
Ideal file would contain only The |
I still can't get why it is necessary. Let's take
All dependencies are pinned, does |
Just to clarify,
I am not sure if there is a CLI option combination. I understand that supporting this use case might be out of scope of the tool, so let me know if supporting this aligns with the future of |
Is that behavior part of a PEP? It seems redundant and counterintuitive (If I'm not misunderstanding it). |
…ents` file Resolves #2519 Signed-off-by: Frost Ming <me@frostming.com>
Thanks!
|
Is your feature/enhancement proposal related to a problem? Please describe.
I am using https://github.com/bazelbuild/rules_python to manage my Python project and I noticed that the
pdm
is a really nice way to generate a cross-platform lock filepdm.lock
. Moreover, it also has a feature to export the lock file torequirements.txt
, which iscross-platform
, i.e. it has annotations on what should be installed on which platform. Having a single lock file for multiple platforms would be great, but unfortunately it does not work at the moment withrules_python
because the extras are removed as per #741.At least for now, the latest
rules_python
version relies on thoseextras
annotations to be present in therequirements
file and I would lovepdm
to be able to provide those too.Describe the solution you'd like
A CLI flag for the
pdm export --format requirements
command to add--extras
.The text was updated successfully, but these errors were encountered: