-
Notifications
You must be signed in to change notification settings - Fork 50
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
Specify optional dependencies per feature #482
Comments
I suppose the real "features" look roughly like this: feature: dependency The first four are just scheme-support that forces a certain version: whether we name the feature by the scheme-family or the dependency itself is not very important I think? Maybe we just leave them as they are (so the feature name is the dependency name) so we don't annoy existing users? Last two (and hopefully more future features) are more interesting and should be named by the feature: I guess the acronyms are good enough? I don't see any major issue with the redundancy Maybe GPG feature should also be defined -- it does depend on cryptography at least -- but I can see why that would be misleading as well... So maybe let's not tackle that issue here. |
This commit reverts 0928ceb, defining all optional dependencies needed for hsm signing and verification in one set. As discussed in secure-systems-lab#482, this makes more sense from a user perspective. The generic "crypto" (for cryptography) dependency is preserved to not annoy existing users. The new "hsm" dependency uses the same lower version bound for cryptography as "crypto", although it might work with lower versions. But it seems reasonable to keep constraints consistent. Signed-off-by: Lukas Puehringer <[email protected]>
We use optional dependencies (aka. extras) to allow a default installation with limited capabilities (e.g. verify ed25519 signatures using a pure Python implementation), which is useful for securesystemslib dependents (e.g. python-tuf), that need to be installable without any native dependencies (e.g. vendored into pip).
The full or a specific larger feature-set (e.g. signing) can be installed by specifying those extras like so:
Except for hiding version constraints this is hardly more useful than telling user to install like so
Current behavior:
Specified per library:
securesystemslib/pyproject.toml
Lines 45 to 51 in e2a08b1
Expected behavior:
cryptography
,pynacl
should be mapped to (or leave those as they are)Caveat:
Specifying them per feature is prone to redundancy. E.g.
cryptography
is needed for an hsm signing, but also for a traditional securesystemslib signing and gpg singing.The text was updated successfully, but these errors were encountered: