WIP: Use pep517 to extract metadata.#401
Conversation
|
Thanks for sharing your work |
|
@tomprince @DavHau Thank you very much for your work! I'd like to help to get this into master. Could you maybe sketch what needs to be done to finish this? |
|
@chaoflow as you probably know, mach-nix sources information about python dependencies from So one way to test what works and what not could be to clone pypi-deps-db (shallowly ;)), then update the mach-nix flake input to this PR and execute the flake app It's probably better to first test extraction on a single package. For this you can use mach-nix' |
|
There is also a draft PR on pypi-deps-db which uses the code here: DavHau/pypi-deps-db#6 |
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_requiresandextra_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,extramarkers) which is a bug (related to markers not interpreted on automatically extracted requirements #190).extract-reqs.lib/extractor/default.nixis unused after this PR.base-envenvironment inmach_nix/nix/extract-metadata.nixbut python2 for themetadata-envandbuild-env.Note: I currently have no plans to continue this work in the future.