WIP: Use pep517 to extract metadata. #401
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm leaving this branch with my work-in-progress for using pep517 (both the package and the PEP) to extract package metadata, instead of a patch setuptools. In particular, this should work with more packages.
An incomplete list of things that still need to be done:
requires-dist
(since this includes the equivalent of the oldinstall_requires
andextra_requires
). This should perhaps be done in the python, before writing out the metadata.mach-nix/mach_nix/data/providers.py
Line 473 in c914064
install_requires
.mach_nix/nix/extract-metadata.nix
) doesn't handle markers (in particular,extra
markers) which is a bug (related to markers not interpreted on automatically extracted requirements #190).extract-reqs
.lib/extractor/default.nix
is unused after this PR.base-env
environment inmach_nix/nix/extract-metadata.nix
but python2 for themetadata-env
andbuild-env
.Note: I currently have no plans to continue this work in the future.