pmgr - a Python Package Manager

pmgr stands for Python Package Manager. It simplifies installing Python packages and modules on *NIX systems with one or more parallel Python installations.

Its key features are:

  • easier interface to Python's distutils
  • build and install python packages from source
  • keep track of installed files and uninstall packages
  • manage a database of installed packages and their versions
  • install multiple packages in batch-mode
  • install packages for concurrent Python installations
  • basic management of package dependencies
  • test packages without polluting your system

pmgr is still under heavy development and subject to major structural alterations. Many design decisions have not yet been made, so future versions of pmgr will probably be working differently from the current version. If all that does not put you off, you're invited to play with it.

pmgr is inspired by Portage, the Gentoo Linux package management system - both work with source distribution archives, build them on the host system before they install them and keep track of installed versions. The main difference is that Portage is far more complex and is backed by a huge infrastructure.

pmgr works closely together with Python's Distribution Utilities distutils, which do most of the installation work, but can also cope with packages that do not comply with that standard. For this purpose there is a feature (borrowed from Portage) called pbuild scripts, which define how to configure, build and install non-distutils packages. Flawed distutils-packages can be processed this way, too. Similar to Portage's ebuild scripts a pbuild script is written in shell code which means that there are (almost) no limitations.

Installing a source package, should be as easy as typing:

foo@bar:~$ pmgr downloads/package-1.2.tar.gz
or even better:
foo@bar:~$ pmgr package

There are some related projects:

  • ciphon - a module for Python that adds cpan-like functionality (OS independent).
  • pypan - a simple package manager for Python (Windows).
  • packman - the Python Package Manager (Mac OS X).