Commit graph

30 commits

Author SHA1 Message Date
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
Zbigniew Jędrzejewski-Szmek
7704ae04c6 meson: hook up update-constants helper
$ ninja -C build update-constants -v
ninja: Entering directory `build'
[1/1] /home/zbyszek/src/python-systemd/update-constants.py /home/zbyszek/src/python-systemd/src/systemd/id128-constants.h /home/zbyszek/src/python-systemd/docs/id128.rst /home/zbyszek/src/python-systemd/src/systemd/id128-defines.h /usr/include/systemd/sd-messages.h
Writing /home/zbyszek/src/python-systemd/src/systemd/id128-constants.h…
Writing /home/zbyszek/src/python-systemd/src/systemd/id128-defines.h…
Writing /home/zbyszek/src/python-systemd/docs/id128.rst…

The helper is updated to do the everything in the python script. The wrapper in
Makefile is dropped. It wasn't working properly anyway, and I think the version
in meson is enough.
2025-10-11 22:26:41 +02:00
Zbigniew Jędrzejewski-Szmek
0677c4a2a5 Use SPDX license tags instead of old-style license headers
This matches the change that was done in the systemd repo
a few years ago.
2025-10-03 16:32:42 +02: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
Zbigniew Jędrzejewski-Szmek
09053a2139 make: fix compat with setuptools >= 61
Fixes #110.
2022-08-13 20:56:48 +02:00
Frantisek Sumsal
76e7478a34 Makefile: accept $SPHINXOPTS from the outside 2022-03-06 19:25:47 +01:00
Dominik Prien
d08f8dd0f4 make: Move -std=99 to setup.py 2020-11-11 22:38:04 +01:00
Zbigniew Jędrzejewski-Szmek
b88119d2b5 make: fix "make doc" invocations
python insists on adding . to python.path, so we always import the systemd
in the top-level directory instead of the one in build/ that we want. Let's
cd into docs/ first, so that we get the right module imported.

Also, replace sphinx-build calls with $(PYTHON) -m sphinx. This has the
advantage that once $(PYTHON) is set, the appropriate sphinx executable is
chosen.
2019-06-16 19:34:39 +02:00
Zbigniew Jędrzejewski-Szmek
a17f3c0ec5 make: use -std=c99
I see no good reason to support old standards, when systemd itself
requires c99. Let's test with c99 in the CI.

Closes #62.
2019-06-16 17:37:53 +02:00
Zbigniew Jędrzejewski-Szmek
a54a7a2f51 Update to constants from systemd-233
In systemd-233 the format of the constants file changed to use
SD_ID128_MAKE_STR macro and long lines are broken with '\'.
Doing this in sed is too anyoing — add a simple python script to
do the processing.
2017-03-25 21:33:05 -04:00
Zbigniew Jędrzejewski-Szmek
fe9756d3ab Makefile: add convenience "shell" target to start python shell 2017-03-19 13:17:13 -04:00
Zbigniew Jędrzejewski-Szmek
3f9386a435 Makefile: add "doc" target for convenience 2017-03-19 13:17:13 -04:00
Zbigniew Jędrzejewski-Szmek
ae08cbfe11 Makefile: remove unneeded -I/usr/include from flags
gcc warns about an include directive that shadows the system include
directory at high verbosity levels. Let's filter it out (pkgconfig
implements that) to reduce noise and also to make the command line
shorter.
2017-03-19 13:17:13 -04:00
Zbigniew Jędrzejewski-Szmek
b4cfd41a06 Makefile: use $(INCLUDE_DIR) also for compilation
This way we can compile against unreleased systemd:
make PYTHON=python3 INCLUDE_DIR=/home/zbyszek/src/systemd/src
(cd build/lib.linux-x86_64-3.5; systemd-socket-activate -E LD_LIBRARY_PATH=/home/zbyszek/src/systemd-master/.libs -l2000 -l127.0.0.1:2001 python3)
2016-12-13 20:27:47 -05:00
Zbigniew Jędrzejewski-Szmek
e4ff9e6f7c build-sys: add sign and upload targets 2016-12-13 20:27:47 -05:00
Zbigniew Jędrzejewski-Szmek
911591a118 build-sys: import "pytest" instead of "py.test"
Fixes the following error in rawhide:
/usr/bin/python3: loader for pytest cannot handle py.test
2016-09-22 20:57:12 -04:00
Zbigniew Jędrzejewski-Szmek
c3c412f90e build-sys: add doc-sync target 2016-09-22 09:59:04 -04:00
Zbigniew Jędrzejewski-Szmek
416efbf411 docs: autoregenerate id128.rst 2016-09-21 20:56:17 -04:00
Zbigniew Jędrzejewski-Szmek
d713eacb7e Store id128-constants.h in the repository
Instead of generating the list of message ids anew during every build,
the file is generated manually and committed into the
repository. Also, the list of defines is stored in id128-defines.h,
also kept in the repository. Both files should only grow.

This should make build easier. But it also fixes a problem with
systemd, which occasionally drops message definitions. We will keep
them forever, so it should be safe to rely on the presence of message
definitions which systemd does not use anymore.

Fixes #23.
2016-09-21 20:16:37 -04:00
Sebastian
8583a45b5c Makefile: correct path to generated docs 2016-09-15 22:31:21 +02:00
Zbigniew Jędrzejewski-Szmek
644e11f398 build-sys: make sure we use modules from the build dir
When running form the top source directory, sometimes modules
from systemd/ and not build/*/systemd/ were loaded.
2015-10-28 09:54:11 -04:00
Zbigniew Jędrzejewski-Szmek
94ee7ed0f9 build-sys: name html build directory after format
This way different outputs don't land in the same place.
2015-10-28 09:46:09 -04:00
Zbigniew Jędrzejewski-Szmek
d31bfc3ba6 build-sys: add utility target to run tests 2015-10-27 00:12:11 -04:00
Zbigniew Jędrzejewski-Szmek
c1c55294f1 build-sys: add utility target to build TAGS 2015-10-27 00:07:18 -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
40e08de1a6 build-sys: add clean targets 2015-08-07 11:49:56 -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
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
31baccc855 build-sys: update setup.py to build everything 2015-07-05 15:10:30 -04:00