Skip to content

Python 3 bindings for libalpm (read-only mirror)

License

Notifications You must be signed in to change notification settings

archlinux/pyalpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6a0b75d · Nov 20, 2021
Jun 13, 2021
Jun 13, 2021
Jun 29, 2011
Nov 20, 2021
Jun 22, 2021
Jan 20, 2019
May 10, 2019
Nov 20, 2021
Oct 21, 2019
Apr 19, 2021
Mar 27, 2017
Apr 3, 2011
Aug 11, 2008
Oct 13, 2011
Jun 22, 2021
Jul 4, 2021
May 8, 2011
Jul 4, 2021
May 2, 2011
Jun 30, 2021
Apr 19, 2021
Jul 4, 2021

Repository files navigation

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.

Requirements

  • Python 3 or later

  • libalpm 13

  • python-setuptools

  • python-pkgconfig

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

Building

Building is as easy as running make

make

Building the docs:

make -C doc html

Testing

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

Releasing

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

Uploading to PyPI

  1. python3 setup.py 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 https://gitlab.archlinux.org/pacman/pacman.git
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