-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
Specifying external dependencies #1712
Comments
Thanks! Does it look like the PEP will be accepted? I haven't followed the progress on it. |
I have no idea whether the pep will be accepted. But regardless of that, |
In case anyone is wondering how to do this, I solve my issue using a build hook, I might turn this into a plugin if I get the time:
|
For reference, I've made it into a plugin: https://pypi.org/project/hatch-external-dependencies/ |
Thanks! I'll keep this open until there is official support, likely when the PEP gets accepted. |
Introduction
There currently exists a draft proposing a way to declare external dependencies in pyproject,toml: https://peps.python.org/pep-0725/
For example in some of my project I specify the following section in my pyproject.toml:
What I expect this will do is add a line in the METADATA file of my build packages as specified here: https://packaging.python.org/en/latest/specifications/core-metadata/#requires-external-multiple-use
Currently no build system properly handle this. Since I was using poetry I made a poetry plugin that takes care of detecting this section and adding the relevant line in METADATA during build: https://pypi.org/project/poetry-external-dependencies/
Then when deploying my package to different system I use a script that detect the external dependency and install what's required on the host system, in the example case it would automatically install
ffmpeg
using apt or apk or other package manager the system offer.Question
Is there an existing way to have hatch automatically add the
Requires-External
line in METADATA ?If not, is there any way to achieve this, or would the plugin system of hatch be capable of supporting this ?
The text was updated successfully, but these errors were encountered: