Commit graph

42 commits

Author SHA1 Message Date
Stefano Rivera
ce7c18dc0b Update Debian install instructions
Systemd has had a single -dev binary package since ~2014, so these have
not worked for a long time.

Noted in #138 (but not the main thrust of the issue)
2026-04-30 18:29:00 +02:00
Jelle van der Waa
cb50f8b057 meson: build docs with meson
Introduce a custom target `html` and a build configuration option
`docs` to build the sphinx html documentation.
2025-11-03 09:49:35 +01:00
Nguyễn Hồng Quân
31b17c0b29 Adopt pyproject.toml and Meson to build Python extension 2025-06-30 18:58:20 +07:00
Jelle van der Waa
684a6cc222 README: stop mentioning Python 2 build dependencies
Python 2 support was fully dropped in 802c8dcaa3 so it can
be a bit confusing to advertise Python 2 build dependencies in the
README.
2023-03-26 17:08:44 +02:00
Guiorgy
f95161fccd fixed PyPI url in last commit 2023-03-04 13:01:11 +01:00
Guiorgy
9267af36d8
Update README.md
Moved pypi instructions under the Installation heading and added a pypi badge
2023-02-06 19:49:12 +04:00
Zbigniew Jędrzejewski-Szmek
c5f8b887be NEWS: say that we'll drop support for python2 soon
I think it's nicer to make one last release with the remaining code
for python2 in place.
2022-08-16 11:03:09 +02:00
Zbigniew Jędrzejewski-Szmek
65b1c19258 README: apt-get → apt
Based on Jörg Behrmann's comment:
https://github.com/systemd/python-systemd/pull/114#discussion_r945896280
> apt is available in the stretch, which is the oldest listed [1] release for it
> and stretch has already ended LTS support.

[1] https://packages.debian.org/bullseye/apt
2022-08-15 19:29:28 +02:00
Zbigniew Jędrzejewski-Szmek
05773b4548 README: drop distro instructions for python2, drop epel/rhel
Fedora has no python2 package, so drop that.
Similarly, with latest Debian and Opensuse, 'apt-get install
python3-systemd' works, but 'apt-get install python-systemd' doesn't.

(Tested with
podman run -it --rm debian apt-get install python3-systemd
mock -r opensuse-tumbleweed-x86_64 --enable-network -i python3-systemd)

It also seems we never built the package in EPEL, so let's drop
RHEL/CentOS from the list.

If people need to, they can install from sources where the distro
packages are unavailable (and they shouldn't be using python2 anyway
at this point.)

Also add 'apt-get update' into the instructions because w/o that
install does not work in a pristine container.

Fixes #78.
2022-08-15 17:50:38 +02:00
Zbigniew Jędrzejewski-Szmek
e261fc0a7e README: markup and line wrapping
Bash doesn't do anything special for a command with '#', but at least
zsh treat it as a comment. It's better to quote such a commandline.
2022-08-15 16:56:40 +02:00
Zbigniew Jędrzejewski-Szmek
8659af2179 README: fix installation urls
pip3 install says:
WARNING: Discarding git+https://github.com/systemd/python-systemd.git#egg=systemd. Requested systemd-python from git+https://github.com/systemd/python-systemd.git#egg=systemd has inconsistent name: filename has 'systemd', but metadata has
 'systemd-python'

Closes #97.
2022-08-15 16:56:40 +02:00
Federico Ceratto
21d9b1664d Set unit name in JournalHandler example, see #74 2022-08-13 16:47:50 +02:00
Zbigniew Jędrzejewski-Szmek
e6b457fb1e
Merge pull request #91 from chrismullins/journal-examples
Journal examples
2022-08-13 16:46:20 +02:00
Architector #4
b109b7587d fix a mistype in README.md
"libsytemd" should obviously be "libsystemd"
2022-06-23 21:07:39 +02:00
Chris Mullins
1088520535 Add link to journal fields docs 2021-01-02 23:12:15 +00:00
Chris Mullins
1532b67c51 Add journalctl example for ring buffer 2021-01-02 23:07:49 +00:00
Chris Mullins
86ad413dfc Add some examples 2021-01-02 23:05:35 +00:00
Zbigniew Jędrzejewski-Szmek
1cb0b342a2 Document libsystemd compatiblity
Closes #49.
2019-06-16 18:19:15 +02:00
Zbigniew Jędrzejewski-Szmek
0198c4543d README: use some more <h2> tags 2019-06-16 16:27:11 +02:00
ytyt-yt
20e0f72d40 add JournalHandler usage in README 2019-06-16 15:13:10 +02:00
Zbigniew Jędrzejewski-Szmek
c06c5d401d README: also mention CentoOS and RHEL in instructions
The latest supported version of Fedora is now 24, and python3 is
supported on all current versions, so drop references to old Fedora
from the README.

Fixes #47.
2017-04-14 10:54:40 -04:00
Johannes Weberhofer
3645c3597e Added section for installation on openSUSE & SLE (#35) 2016-12-16 21:08:42 -05:00
Robert James Hernandez
aabbf9b40d Updating docs for missing dependency (#28)
I was trying to build python-systemd from source but ran into the same issue here: #17

I Figure the docs should be updated to reflect this dependency.
2016-10-10 20:11:10 -04:00
Zbigniew Jędrzejewski-Szmek
3758d884d4 setup.py: change name to systemd-python
This name is unused on pypi. Let's grab it.
2016-09-21 20:57:58 -04:00
Sebastian
2e3512c656 Add Docs to README 2016-09-15 22:29:25 +02:00
Nir Soffer
44acd1c9d1 readme: Use "raised" instead of "thrown"
Should be more familiar to the users of this library.
2016-05-28 22:48:11 +03:00
Nir Soffer
9fd0159c47 readme: Remove duplicate 'is thrown' 2016-05-28 22:45:16 +03:00
Ville Skyttä
947f782886 Spelling fixes 2016-05-21 08:47:00 +03:00
Zbigniew Jędrzejewski-Szmek
ddca9bbe3a build-sys: use pkg-config to build with old systemd
This should allow the build to just work on old Ubuntu
and similar.
2015-09-04 09:50:51 +02:00
Zbigniew Jędrzejewski-Szmek
d03d276625 README: add semaphore build badge 2015-09-03 20:27:36 +02:00
David Strauss
58c65cf10a Update source building instructions
* Only list Fedora 21+. Older releases are no longer supported by upstream, let alone for systemd development.
* Fedora now uses `pip` and `pip3`, not `pip-python` and `pip-python3`. By only documenting Fedora 21+, we can be consistent in the instructions.
* Use HTTPS for git (rather than HTTP).
2015-08-02 10:18:01 -04:00
Zbigniew Jędrzejewski-Szmek
410f054ddf Update LICENSE file and classifiers
The license was originally MIT, but when this module became part of systemd,
it was changed to LGPLv2+. All files had correct headers, so only the LICENSE
file needs updating. Take the opportunity to add classifiers to setup.py.
2015-07-05 20:16:51 -04:00
David Strauss
5f531b971e Add Python 3 instructions. 2012-09-06 18:22:08 -07:00
David Strauss
7050e537b2 Doc updates 2012-09-06 16:48:51 -07:00
Zbyszek Jędrzejewski-Szmek
2b1a5c9ff4 Allow UTF-8 in message payload
Allow UTF-8, and force encoding as UTF-8 if the payload is known to be
text. Under Python 3, this means that bytes payload is sent as-is, and
strings are encoded to UTF-8. Under Python 2, this means that unicode
payload is encoded to UTF-8, and the rest is sent as-is, because there
we are missing the extra information to distinguish text and binary data.
IOW, under Python 2, it is the responsibility of the called to provide
properly encoded payload, and under Python 3, there is extra hand-holding
which should help catch mistakes.

Fields which are certain to be text (MESSAGE, MESSAGE_ID, CODE_FILE,
CODE_FUNC) are text-only. The names of fields are text-only too. The
payload of other fields can be binary.
2012-07-12 11:07:16 +02:00
Zbigniew Jędrzejewski-Szmek
557184bb56 Add frontend module in pure-Python and hide old module
journald.send() is renamed to journald.sendv(), and a replacement
journald.send() is added. This new function has a more pythonic API,
where one positional argument is used for the message, and keyword
arguments can be used to specify other fields.

Implementing argument parsing in C would be really painful, for little
gain, so a pure-python module is added, which provides send(), which
in turn calls sendv().
2012-07-12 11:02:30 +02:00
Zbigniew Jędrzejewski-Szmek
48a2295bb7 Check the return value from sd_journal_sendv 2012-07-10 10:26:40 +02:00
Zbyszek Jędrzejewski-Szmek
78a234c6d3 Wrap README to 80 lines 2012-07-10 10:20:31 +02:00
David Strauss
63fd53fc00 Documentation updates. 2012-06-26 01:20:09 -07:00
David Strauss
b03b0ab4db Add test build instructions. 2012-06-25 23:07:03 -07:00
David Strauss
cb38f73ede Initial boilerplate work. Compiles without warnings. Untested. 2012-06-25 23:02:40 -07:00
David Strauss
7bcd859895 Initial commit 2012-06-25 16:58:29 -07:00