Start using python programs like
Pelican and you’ll soon run into instructions for
installing other little python applications using a tool
Now just say you’re using a distribution like Arch Linux,
which has its own package manager (pacman) and also its own
user software repository (the AUR). Should you just use
pip, search for the package in the
AUR, or what? Using
pip without the involvement of pacman means that you won’t
be able to easily keep track of those python packages and
dependencies which you have installed on your machine.
Fortunately, on StackExchange user rmorgans has suggested a smart solution:
For certain packages (ones that I most probably don’t want to hack), I make my own package using this:
then build and install the PKGBUILD produced.
This solutions offers us the best of both worlds: access to
the massive Python Package Index (PyPi) using
tracking of installed packages using the Arch’s pacman package manager.
For example, you could follow these steps to build and install the python typogrify package:
First, we’ll download pip2arch:
git clone https://github.com/bluepeppers/pip2arch.git cd pip2arch
Now we can use pip2arch to create a
pkgbuild file, which we
can then use to create a pacman compatible software package:
python pip2arch typogrify
- You should now have a pkgbuild file called PKGBUILD in the pip2arch directory.
- As an optional step, you can check the validity of the
package using the pacman package analysis tool, namcap
(install it with pacman):
We’ll use makepkg to build the package:
- If this process is successful, you should end up with some
files in the pip2arch folder like
Finally, we can install the package using pacman:
pacman -U typogrify-2.0.7-1-any.pkg.tar.xz