You are not logged in.

#1 2016-06-14 06:53:24

antony
Member
Registered: 2011-07-14
Posts: 43

PyPI2PKGBUILD: Automated PKGBUILD creation for PyPI packages

The venerable pip2arch (https://github.com/bluepeppers/pip2arch) automatically generates PKGBUILDs for PyPI packages.  PyPI2PKGBUILD (https://github.com/anntzer/pypi2pkgbuild) is a new (Py3-only) tool with a similar functionality, but a few improvements:

- Supports wheels (if both a sdist and a wheel is available, prefer the former, except if `-w` is passed).
- Resolves dependencies via installation in a temporary virtualenv (much more reliable than via the PyPI web interface, and handles environment markers (https://www.python.org/dev/peps/pep-0496/) correctly); calls itself recursively for dependencies that are not available as official packages.
- Resolves binary (non-python) dependencies via namcap and adds them to the depends array if they are installed (thus, it is suggested to first install them as --asdeps and then let the generated PKGBUILD pick them up as dependencies).
- Automatically tries to fetch a missing license file from Github/Bitbucket, if applicable.
- Automatically builds the package and run `namcap`.

The goal is to make this tool as automated as possible: if all the information to build a package is (reasonably) accessible, this tool should be able to build it.

Patches and suggestions welcome.

Last edited by antony (2016-06-30 18:17:20)

Offline

Board footer

Powered by FluxBB