Commit graph

386 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
a947f32b31 tests: add tests for notify() 2015-10-26 23:38:58 -04:00
Zbigniew Jędrzejewski-Szmek
6baa4b417b daemon: wrap sd_pid_notify[_with_pids]
Closes #8.
2015-10-26 22:51:27 -04:00
Zbigniew Jędrzejewski-Szmek
035700c2b5 Merge branch 'tests' 2015-10-25 16:51:04 -04:00
Zbigniew Jędrzejewski-Szmek
1d8f5f26df tests: work around bug in sd_is_mq
The fix was committed in v226-362-g0260d1d542.
2015-10-25 16:50:59 -04:00
Zbigniew Jędrzejewski-Szmek
4be2fc75bf Do not assume specific output from the journal
While we *usually* get those messages from udev, in many tests environments
this will not be true, so just do not try to check the output at all.
2015-10-25 12:23:29 -04:00
Zbigniew Jędrzejewski-Szmek
2e3e9748d4 build-sys: replace loop with list comprehension 2015-10-25 11:56:13 -04:00
Jeroen Dekkers
718cefefcd build-sys: generate systemd/id128-constants.h in setup.py
Fixes #7.
2015-10-25 11:55:48 -04:00
Zbigniew Jędrzejewski-Szmek
173c2a89b2 tests: add simplistic tests for Reader matches
It would be nice to run those tests against fake journal files
with the right content to actually test the matches. But those
tests are still useful because they test that the interface
works as expected.
2015-09-16 12:43:06 +02:00
Zbigniew Jędrzejewski-Szmek
4f5aa7b54a journal: allow numbers in field identifiers 2015-09-17 11:53:45 +02:00
Zbigniew Jędrzejewski-Szmek
bbbc6e8a92 tests: add tests for Reader initialization 2015-09-17 11:53:45 +02:00
Zbigniew Jędrzejewski-Szmek
008aac74d7 journal: reindent to 4 spaces 2015-09-17 11:53:45 +02:00
Zbigniew Jędrzejewski-Szmek
5bf468dca1 tests: start adding tests for JournalHandler 2015-09-17 11:53:45 +02:00
Zbigniew Jędrzejewski-Szmek
5f36e8647a Normalize some strange indentation 2015-09-08 10:36:16 +02:00
Zbigniew Jędrzejewski-Szmek
085db21e5e tests: add more tests for socket functions 2015-09-06 18:54:55 +02:00
Zbigniew Jędrzejewski-Szmek
e6b305b41a tests: adapt to python2.7 output again 2015-09-05 14:23:20 +02:00
Zbigniew Jędrzejewski-Szmek
0cf0cf7e42 tests: daemon.booted 2015-09-05 14:18:32 +02:00
Zbigniew Jędrzejewski-Szmek
2e115f3c4f tests: daemon.listen_fds 2015-09-05 14:18:23 +02:00
Zbigniew Jędrzejewski-Szmek
c76c5f0ef7 tests: fix test discovery by pytest 2015-09-05 13:47:47 +02:00
Zbigniew Jędrzejewski-Szmek
26a9c1f18a tests: also collect doctests from rst
There isn't much to test now, but it doesn't hurt to enable.
2015-09-05 13:33:40 +02:00
Zbigniew Jędrzejewski-Szmek
cc5f218a50 tests: enable doctests in the sources
Unfortunately the "standard" way to access the names in the
defined module does not work. I find it nicer to explicitly import,
e.g. from systemd import journal, because then the examples
correspond more closely to what a user would use. The only
exception is made for JournalHandler, because journal.JournalHandler
is a tad to long.
2015-09-05 13:09:43 +02:00
Evgeny Vereshchagin
b71b8b64eb Fix booted() doc 2015-09-04 18:30:10 +02:00
Zbigniew Jędrzejewski-Szmek
f83dea9f8d Add compatibility with systemd < 205 2015-09-04 17:16:28 +02:00
Zbigniew Jędrzejewski-Szmek
c71fbb58e5 build-sys: output full pkg-config output on failure 2015-09-04 12:21:28 +02: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
Zbigniew Jędrzejewski-Szmek
a93828172f tests: add first test
This is based on the code in https://github.com/systemd/python-systemd/pull/4
by Jacek Konieczny <j.konieczny@eggsoft.pl>.
2015-08-07 11:49:56 -04:00
Zbigniew Jędrzejewski-Szmek
d2bc513440 tree-wide: systemd→python-systemd in headers 2015-08-07 11:49:56 -04:00
Zbigniew Jędrzejewski-Szmek
40e08de1a6 build-sys: add clean targets 2015-08-07 11:49:56 -04:00
Jacek Konieczny
71d82616a8 Fix daemon.is_fifo and .is_mq under Python 3
The 'path' parameter was not properly converted from Unicode
and the functions would always fail when a path was provided.

https://github.com/systemd/python-systemd/pull/4
2015-08-07 11:49:42 -04: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
108d3d8ea9 build-sys: also add installation and dist targets 2015-07-08 15:32:40 -04:00
Zbigniew Jędrzejewski-Szmek
344d520d8c build-sys: exclude id128-constants.h after all
This file should be rebuild from latest systemd headers, and
not distributed here.
2015-07-08 15:23:02 -04:00
Zbigniew Jędrzejewski-Szmek
c030a453c2 docs: avoid warning about duplicate target name 2015-07-08 15:17:00 -04:00
Zbigniew Jędrzejewski-Szmek
2f5a390239 docs: update links in documentation
This is a standalone package now, but let's keep the links
to systemd itself.
2015-07-08 15:12:25 -04:00
Zbigniew Jędrzejewski-Szmek
f13a571db2 build-sys: call setup.py from make 2015-07-08 14:49:46 -04:00
Zbigniew Jędrzejewski-Szmek
e706969039 build-sys: add make rules for documentation 2015-07-08 14:47:46 -04:00
Zbigniew Jędrzejewski-Szmek
1ad7f56b90 Move docs to top level and include in manifest 2015-07-08 13:45:03 -04:00
Zbigniew Jędrzejewski-Szmek
2cef4ef7fc Bump version to 230 v230
This matches what was done for libgudev. This way we have plenty of time
to remove the module from systemd, and this version will always be "newer".
2015-07-05 21:37:09 -04:00
Zbigniew Jędrzejewski-Szmek
f58519d53e Specify system-devel@ as the maintainers 2015-07-05 21:32:42 -04:00
Zbigniew Jędrzejewski-Szmek
9d0b8bbaf0 build-sys: add MANIFEST.in to properly include all files 2015-07-05 21:32:42 -04:00
Zbigniew Jędrzejewski-Szmek
e1ce6a2802 Use python-systemd as the name
We want the package to be installed under this name.
This is also used for sdist, and we want python-systemd-<version>.tar.xz.
2015-07-05 21:32:42 -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
Zbigniew Jędrzejewski-Szmek
31baccc855 build-sys: update setup.py to build everything 2015-07-05 15:10:30 -04:00
Zbigniew Jędrzejewski-Szmek
022c9b5be4 Merge development in systemd upstream 2015-07-05 14:19:22 -04:00
Kay Sievers
2a3fc158a5 remove gudev and gtk-doc
The library moved to:
  https://git.gnome.org/browse/libgudev/
2015-07-05 14:19:22 -04:00
Simon Farnsworth
d6c4257815 python-systemd: fix is_socket_inet to cope with ports
Just a couple of trivial oversights.
2015-07-05 14:19:22 -04:00
Dave Reisner
7ea37c0d40 python-systemd: avoid hitting assert in __exit__
Reader_close() asserts that 'args' is always NULL, but the __exit__
function forwards a non-NULL args.
2015-07-05 14:19:22 -04:00
Zbigniew Jędrzejewski-Szmek
a68a57ed71 Always prefer our headers to system headers
In practice this shouldn't make much difference, but
sometimes our headers might be newer, and we want to
test them.
2015-07-05 14:19:22 -04:00
Zbigniew Jędrzejewski-Szmek
4398250261 systemd-python: fix failing assert
A parameter which was always null before, now get's set to
the module.
2015-07-05 14:19:21 -04:00
Zbigniew Jędrzejewski-Szmek
583f1a9441 systemd-python: use .hex instead of .get_hex()
It turns out the latter got removed in Python 3.

https://bugs.freedesktop.org/show_bug.cgi?id=77086
2015-07-05 14:19:21 -04:00