-
Notifications
You must be signed in to change notification settings - Fork 35
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
Get metadata for unbuilt package #224
Comments
Isn't this just |
Yes, maybe. And the fallback for when that optional method isn't supplied is for the build tool to actually build a wheel and query the metadata from the result. Now all that's needed is a tool that (a) orchestrates this process and (b) extracts the metadata reliably from the result. Even with this tool, in this comment, @Jonast expresses some concerns that may arise. Having |
This should be covered by https://github.com/pypa/pep517 It probably needs some more real world use to iron out the details and improve the interface, but certainly the intention is that it provides a standard interface to PEP 517, for tools to use. Please feel free to try it out and help out with ensuring it meets real world needs. |
I'm looking forward to checking it out. |
(ignore this, I was confused) @jaraco as I explained in the other ticket, I don't think anything that requires Edit: it may also require installing dependencies for |
The idea here is that build backends that support something like |
(ignore this as well, was still confused) Will setuptools/distutils do that? (I use Edit: oh right. I misunderstood, so if |
@jaraco I've looked into some of the
In the end, the best result with hardcoded "setuptools" backend I was able to get was So how can I get the requirements for an uninstalled package? Because with nothing in the |
Now with
I haven't gotten a single method to work properly... 😢 and I'm not saying they're broken, but the README example of pep517 right now seems outdated/broken/useless for anyone who doesn't know in-depth how the systems work |
Okay, with |
It sounds like you're trying to use Having said that, yes the documentation is weak at the moment. Help in improving it is welcome, of course... |
@pfmoore but I was redirected here to use it to get dependencies of an installed package. If that's not what
Well I don't have that. I really just want to get the dependencies, and all I have is a folder path Edit: wait I'm not sure I understand the pip tidbit. You're saying pip doesn't parse |
Oh wait, sorry. I hadn't read the full thread here (I'd seen a number of pings on different issues and got confused). In my view (and it's only my view!) "the intention is that it (
I'm not aware of any tool that does that right now.
Sorry, maybe I wasn't clear. Pip does parse |
@jaraco got any input on this? specifically on what I should be using if not |
@jaraco I implemented this now, but the big question seems to be where it should go: pypa/pyproject-hooks#44 A ticket for the discussion of having a basic package examination library for unbuilt/not installed packages: #247 Just to reiterate this, pep517, as it is now, is IMHO a bad match for this task because it's not universal/highlevel enough. To be precise, pep517 cannot easily spit out absolute basics like name or dependencies without quite some additional code, and it cannot deal with remote references which is needed for dependency analysis & only focuses on spilling out sdist and/or wheel of a local source tree |
@Jonast, In pypa/pyproject-hooks#48, I have a working implementation for preparing the metadata as an in-memory zip-file and in importlib_metadata!67, I've demonstrated using that functionality to load the metadata. I'm still working out a few kinks, but feel free to review/comment. |
This issue was mostly solved in pep517.meta and later ported to |
There are many use-cases where a packager / installer may need to know something about a project prior to building/installing it. Maybe they need to inspect the dependencies or find the name of the package being installed or perform some checks on the version that would be produced.
In the distutils-only world, the challenge would rest on distutils to supply interfaces to expose that information. Distutils adds support for
setup.py --name
and--version
and--requires
(although that last one doesn't work because nobody is using metadata 1.1).In the PEP 517 world, since arbitrary builders might exist, distutils/setuptools cannot be responsible for defining the interface for such use-cases, as a caller can no longer assume the project can be built by setuptools.
For now, projects are limping along by relying on distutils and will find themselves unable to wean themselves off of
setup.py
unless these use-cases have a solution in the PEP 517 world.The text was updated successfully, but these errors were encountered: