[pacman-dev] Pacman configuration parser library

Xyne xyne at archlinux.ca
Wed Jan 4 07:48:53 UTC 2017


On 2017-01-02 19:58 +0100
Jelle van der Waa wrote:

>I'd like to chime in that I would love to see pyalpm to stop using it's
>self written config parser. I've put it on my TODO list, but I'm not
>sure when I'll be able to look at it.

At the risk of it becoming vaporware, I'm working on this right now. I
already have a working shared library for src/pacman/conf.h (via CMake) and the
beginnings of a Python extension module for working with it (so far it only
includes a wrapper around "parseconfig" and a class for config_repo_t).

As I was writing that module I realized that I need most of alpm so I've started
writing my own Python module for that too. I'm using scripts to automatically
generate code for all of the enums and structs to ensure uniformity. The idea
is to provide a module with a 1-to-1 correspondence with alpm.h (all enums as
globals, classes for each struct, identical function names) along with utility
modules for convenience code (e.g. convert enums to strings). This will make it
much easier to maintain.

I'm not forking pyalpm because a) I'm using this as a learning experience and
prefer to do it from scratch and b) I'm adopting a different approach.

I'll make an announcement here once it's released.

Regards,
Xyne


More information about the pacman-dev mailing list