-
Notifications
You must be signed in to change notification settings - Fork 49
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
What is the official way to get package dependencies without building? #100
Comments
Well, the entire To answer the underlying question though -- No. There is no "official" approach to getting the metadata/package dependencies of a package without building. The closest to that is using the equivalent of |
@pradyunsg thanks for the answer. But then a followup question would be, should there be an official way? For example should this be added to python-build? |
I don't see pep517.meta mentioned as scheduled for removal |
We should probably mention it specifically in the README, but everything which relies on creating a build environment and installing dependencies is deprecated in this project, because those are fairly complex things which this package has never really done a good job of. |
The build package does offer an API besides just CI and solves:
So I guess we could add support for this, if @FFY00, @layday, @pganssle (other maintainers besides me) agree. I'm personally +1 on a such proposal. |
I'm happy to fallback to building if the build-system doesn't provide the metadata - eg like how |
Would this require anything other than exposing |
PEP 621 is being discussed to add a standardized dependencies table in pyproject.toml. |
That's advisory and non required metadata. It can be a shortcut to finding some information without the need of the build backend but will never be mandated, frontends can decide not to support it, and users can always opt-out of it via the dynamic tag. The only universal way of getting package metadata remains PEP-517. |
Yep I currently use pep517.meta.load and now understand that it's pending deprecation. Could you hold off on the deprecation until an upgrade path is available? |
Ah right, you'd like a wrapper that automates calling |
Yes. And as @gaborbernat noted, it's quite likely that the maintainers of that project would be up for that! :) |
I have created an issue in build pypa/build#181 to request this feature as @gaborbernat suggested. |
There are cases in which it is needed to get the requirements of a package without having to build it, see for example github's dependabot #2281. Is using
pep517.meta.load
the recommended way to do this?The text was updated successfully, but these errors were encountered: