[systemd-devel] Use python-systemd with virtualenv or pyvenv

Ludovic Gasc gmludo at gmail.com
Sat May 2 15:11:10 PDT 2015


I'm trying to use python-systemd with a pyvenv: We use pyvenv to add
different set of librairies on the server for each daemon without to
disturb Python at the system level.
I don't find a way to compile systemd with a pyvenv enabled.

To by-pass the issue and ideally to be installable via PyPI or at least
with pip, I've tried to add a setup.py.
I've started something for that, but now I'm blocked, technical details:

If somebody has a clue, I'm interested in.
Nevertheless, if you have an alternative solution, I'm also interested in,
I see at least two:

1. Find a way to compile python-systemd directly from the source code of
systemd and use a pyvenv instead of Python system
2. Implement journald protocol in pure Python: I don't need
all python-systemd for now, only to push logs, it should be quicker to
implement that instead of to try to install python-systemd via pip.
I've tried to find a documentation about the protocol specification used in
unix socket. I've found nothing except source code.

Thanks for your suggestions.

BTW, I've played a little bit with structured log mechanism, it's awesome,
I've several ideas to use that for our sysadmin needs, like to find easily
all HTTP requests from a specific tenant.
Ludovic Gasc (GMLudo)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150503/07105455/attachment.html>

More information about the systemd-devel mailing list