-
Notifications
You must be signed in to change notification settings - Fork 2
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
Read modified conda dependencies from wheel metadata #25
Comments
If a tool is generating the meta data entries, then it probably would be simplest for the tool to just generate all of the conda dependencies directly, but if they are being maintained using the PEP 725 mechanism, only added/dropped (or perhaps renamed) entries should be listed. We can use |
It could be a long time before standard build tools support PEP 725 and poetry seems even less likely to bother to implement this, so it might be worth considering other mechanisms.... One possibility would be to use optional dependencies either using different keys: [project.optional-dependencies]
whl2conda-add = [
"pytables >=3.10"
]
whl2conda-drop = [
"tables"
] This would result in wheel METADATA:
Another option would be to just use an impossible version spec to indicate removal: [project.optional-dependencies]
whl2conda = [
"pytables >=3.10",
"tables ===drop",
] which would result in
Would be nice to also support some sort of rename declaration with wildcards, but I don't know that there is a good way to do that which would not violate the requirement that the dependencies be specified as valid PEP 508 strings. |
Probably should really include some sort of support for renaming. Otherwise, users will have to list package dependency versions in two different places, which is highly likely to break. One possibility would be to once again use the arbitrary equality version operator [project.optional-dependencies]
whl2conda-rename = [
"tables ==pytables"
] which would result in the following METADATA entries:
|
Looks like PEP621 support work is at least underway for poetry |
Note that poetry does not currently implement any syntax that maps to the "arbitrary equality clause" ( |
Another option would be to further abuse the extra namespace: [project.optional-dependencies]
whl2conda-rename-tables = ["pytables"]
|
Support some way for the wheel to publish information about its conda dependencies. Wheels configured
in this way could be converted to conda packages with no other external information.
One way to do this would be using the Requires-External metadata key. The wheel
METADATA
file could contain lines like:Rather than support the rename syntax in the metadata, we probably should just explicitly
list names to add and names to drop. E.g.
There don't appear to be any pyproject fields that map to this metadata, but there are some
tools like auditwheel that can add these fields to existing wheels.
Note that PEP 725 proposes to add a
optional-dependencies
whose entries are PURL strings. There is a PURL
format for conda,e.g:
but since we are not actually describing an actual external dependency but an alternate dependency,
we should probably add a type specifically for this package:
We could also provide a builder plugin to generate these entries from the pyproject file when
the wheel is built or we could have an option of this program to add those entries to an existing
wheel.
The text was updated successfully, but these errors were encountered: