-
Notifications
You must be signed in to change notification settings - Fork 18
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
Use build.util.project_wheel_metadata to get the package dependencies/requirements #42
Comments
@wwuck What are your thoughts on shipping this as its own PyPI package, to: a) make it easily available accessible |
The same objections are on my side. It does not look like a standard way of getting package dependencies. It's more like "it can be done". Anyway, nice work. So, I think that I will wait until there is an actual API for getting dependencies in build or pep517 packages. From my side I do not care where it will be, but I do care about potential "API" breakages. |
I'm somewhat in agreement @arkq, except its hard to know if a "standard API" will ever appear given previous comments from some of the PyPA people. In any case, I'm guessing it would just be some sort of wrapper around the example from pypa/build#181. At least that bug has now been re-opened so there is hope that something more "standard" may appear sooner rather than later. |
@arkq It’s finally arrived? |
It looks like there is finally a standard supported way to get the package dependencies/requirements via PEP517.
pypa/build#181
From the end of the discussion on that issue, something like this should work:
This should work for any package/project that uses a PEP517 compatible build backend, eg. setuptools, flit, poetry, whey, etc. I've only tested it myself on https://github.com/pypa/sampleproject which uses setuptools.
EDIT: https://pypa-build.readthedocs.io/en/latest/api.html#build.util.project_wheel_metadata is now available and should be sufficient for this feature.
The text was updated successfully, but these errors were encountered: