-
Notifications
You must be signed in to change notification settings - Fork 54
New command pep517.meta #48
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
Conversation
The code in b35a8dd is currently released to https://m.devpi.net/jaraco/pep517-meta. |
See importlib_metadata!67 for the corresponding importlib_metadata work. |
If I understand correctly, this implements a proposed extension to PEP 517? If that's true, then I think that we should hold off on merging this PR until that proposed extension is accepted, |
No. This PR only implements APIs around the already specified hooks defined in PEP 517, namely prepare_metadata_for_build_wheel. This new command and API follow the patterns found in It does go one step further. Based on the discussion and recommendation in pypa/packaging-problems#226, the But as you can see, each of these functions are disentangled from the more fundamental functionality (building the metadata in some target directory). |
OK, cool. My apologies, I got the idea it was an extension from this comment. I must have misread the thread (I was skimming quickly, I don't have time right now for a full review). |
Here's an example of this functionality in action:
Another thing I'm considering is instead of stopping at generating the zip file, perhaps
|
Also, as is demonstrated by failures I discovered above, we should add tests.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks ok but needs cleanup and tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this generally looks good and promising, I would say add a few tests to cover the new code and we're good to give it the first go (tox definitely would like to use this e.g.).
As you can see, tests are failing on Python 2.7 due to |
I feel a lot better about this latest implementation. It suppresses the output from the |
@pfmoore can we land this? |
I'm going to leave that decision to @takluyver as owner of this project. My only real interest is in the wrappers, which pip uses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, and sorry it's taken me a while to get to looking at this.
Thanks for the review. All good points. I'll follow up later. |
I believe I've addressed all of the concerns that @takluyver raised. Any remaining concerns or comments? |
Thanks! |
@takluyver want to do a release with this? thanks! |
There you go, 0.6.0 now out. |
PS @jaraco or anyone: if you got a notification about the deploy failure, don't worry. I had forgotten that the releases were automated, and my personal release habit is to upload to PyPI first and then create the tag, so it failed because the packages were already on PyPI. |
As outlined in #26, this command implements a
pep517.build-meta
pep517.meta
command, allowing for building metadata for a source directory.The new
build_meta
meta
module also exposes an API for retrieving the metadata as an in-memory zip file allowing consumers to receive metadata in-process without thread safety and other race concerns.Additionally, this request adds a
compat_system
function which, given a source directory, produces a "build system", either by loading it from pyproject.toml or falling back to "setuptools (legacy)".This proposed technique fulfills the needs of
importlib_metadata
or other consumers that wish to load metadata from PEP 517 projects on disk, or ifcompat_system()
is passed forsystem
, for most any project.Edit: This technique additionally introduces a
load()
function for loading animportlib_metadata.Distribution
object from a source directory.One downside I'd like to still investigate: