Skip to main content

libalpm bindings for Python 3

Project description

pyalpm - python bindings for the libalpm library

Build Status Documentation Status

pyalpm is a C extension for Python 3 that give access to the libalpm API for package management, which is used, for example in the Arch Linux distribution.


  • Python 3 or later

  • libalpm 13

  • python-setuptools

  • python-pkgconfig

  • python-sphinx (optional, to build the docs)


Building is as easy as running make


Building the docs:

make -C doc html


Required test dependency:

  • python-pytest
  • gcovr (optional, generating C coverage)

Unit tests can be run with:

make test

Coverage for Python code can be generated as following:

make open-coverage

Coverage for the CPython code can be generated as following:

make open-ext-coverage


  1. Bump version in
  2. commit
  3. git tag

Uploading to PyPI

  1. python3 sdist
  2. twine upload -s dist/* --verbose

Pacman development compatibility

The master branch tracks the most recent pacman release and thus libalpm release, the next branch follows pacman's master branch.

Building against pacman-git is as simple as:

git clone
mkdir build
cd build && meson .. && ninja
PKG_CONFIG_PATH=/path/to/pacman/build/meson-uninstalled make build

Running tests against pacman-git:

LD_LIBRARY_PATH=/path/to/pacman/build/ make test

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyalpm-0.10.6.tar.gz (51.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page