Drafter: Add a python provider (and PEP517 macros)
Drafter should be able to parse python tarballs from pypi/github or well, anywhere.
Requirements
-
Add a basic python provider -
Determine whether the python tarball builds with setuptools or PEP517 -
If a setup.py file exists build with setuptools -
If a pyproject.toml or setup.cfg file exists assume the project implements PEP517 -
Add these packages to builddeps for PEP517: python-build python-installer python-packaging python-wheel
(moss-deps doesn't understand python deps yet so leave on the table for now)
-
-
-
TODO: Deicide whether setuptools or PEP517 takes higher precedence if a tarball supports both -
Prepend python-
to the package name for most cases -
If the source comes from pypi mutate it to make it human readable: -
E.g. The default link when downloading build from pypi is:
https://files.pythonhosted.org/packages/52/fa/931038182be739955cf83179d9b9a6ce9832bc5f9a917a006f765cb53a1f/build-0.8.0.tar.gz
We want it to be:
https://files.pythonhosted.org/packages/source/b/build/build-0.8.0.tar.gz
-
Edited by Joey Riches