-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add package settings to modify install dependencies Requires-Dist
#484
Comments
Modifying the wheel would result in publishing binaries that don't match the source code, which might cause us some issues downstream. Is there a generic way to patch the source? Not everything uses pyproject.toml, so maybe not? |
There is no generic way. There isn't even a generic way for Setuptools uses I agree that it would be better if we could patch the dist requirements in the sources. But that's at least a magnitude more complex and requires a ton of special code. Our platlib wheels already depend on information that is not in the the sdist anyway, e.g. env vars from the builder container, installed packages, and package settings. We could include the package settings yaml in the metadata to document the modifications. |
We should look at how to include build documentation separately from this change. We have multiple settings files that could influence a given build, but we should be able to aggregate all of the information. |
If we decide to move forward with this approach, then we also have update the |
In PR #407 we added a feature to modify the build time dependencies of a package. In a few cases, we also want to modify the installation time dependencies (
Requires-Dist
) of a wheel. Sometimes we want to remove a dependency, sometimes we want to change the version constraint of a package. At the moment, we are using patches for the task. Patches costly to maintain and often conflict when a package is updated.Every build system has one or more options to store build dependencies. Some use
pyproject.toml
, some read from arequirements.txt
, some packages create dependencies in the fly in theirsetup.py
. The easiest approach to modify install requires is to rewriteMETADATA
file of the wheel.Proposal
Add two new fields
update_dist_requires
andremove_dist_requires
toProjectOverride
. The values are alist[Requirement]
.When a package settings as either update or remove dist requires, then
METADATA
file withemail.parser.Parser
or similarRequires-Dist
list and match packages by name +extra
marker, then either remove, add, or modify the entryMETADATA
fileRECORD
with new digest and file sizeExample from InstructLab's METADATA:
The text was updated successfully, but these errors were encountered: