python-ckdl-git
LOW
maintainer zitro
0 votes
scanned 2026-09-01 17:48:51.913915
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: zitro <0 at zitro dot id>
2
3
# The Python bindings for ckdl, a KDL document language parser written in C.
4
# Upstream carries the library and both its bindings in one repository, and
5
# `ckdl-git` builds the C and C++ halves of it; this builds the Python one.
6
#
7
# It depends on `ckdl-git` for nothing. Upstream's `pyproject.toml` compiles the
8
# library into the extension, so `_ckdl.*.so` links `libc` and `libm` and
9
# nothing else -- verified with `ldd`, and worth stating because a reader who
10
# knows the C package is here will reasonably expect a link that is not there.
11
# Installing both is fine; neither owns a path the other does.
12
13
_pkgname='python-ckdl'
14
_upstream='ckdl'
15
pkgname="${_pkgname}-git"
16
pkgver=1.0.r11.gc9c33fe
17
pkgrel=1
18
19
pkgdesc="Python bindings for ckdl, a KDL document language parser written in C (git version)"
20
# A compiled extension rather than pure Python, so not `any`.
21
arch=('i686' 'x86_64')
22
url='https://github.com/tjol/ckdl'
23
license=('MIT')
24
depends=('python' 'glibc')
25
26
# What upstream's `[build-system]` asks for, each already in the repositories.
27
# `ninja` is the generator scikit-build reaches for off Windows, and `cython`
28
# compiles the binding -- which is what the C compiler is busy with during a
29
# build, rather than the KDL library itself.
30
makedepends=(
31
'git'
32
'cmake'
33
'cython'
34
'ninja'
35
'python-build'
36
'python-installer'
37
'python-scikit-build'
38
'python-setuptools'
39
'python-wheel'
40
)
41
42
provides=("${_pkgname}=${pkgver}")
43
conflicts=("${_pkgname}")
44
45
source=("${_upstream}::git+${url}.git")
46
md5sums=('SKIP')
47
# Upstream signs its tags, and this still does not use `?signed`, for the same
48
# reason as my other `-git` packages: many AUR helpers carry a `devel` feature
49
# that refreshes the source repo without re-reading the PKGBUILD, and pulling a
50
# signature would break that the moment a key or a tag moved.
51
52
53
pkgver() {
54
cd "${srcdir}/${_upstream}";
55
56
git describe --long --tags | sed -re 's/([^-]*-g)/r\1/;s/-/./g;s/^v//g';
57
}
58
59
build() {
60
cd "${srcdir}/${_upstream}";
61
62
# Upstream's root `pyproject.toml` builds the Python bindings alone, driving
63
# CMake through scikit-build. The C and C++ sources `ckdl-git` installs as
64
# libraries are compiled again here, into the extension, and are not installed
65
# separately.
66
#
67
# Isolation is off because every build requirement is a system package, and a
68
# sandboxed build would fetch them from PyPI instead.
69
#
70
# The dependency check goes with it. Upstream names `cmake` and `ninja` in
71
# `[build-system] requires`, where they are PyPI wrappers around the binaries;
72
# `build` looks for installed Python distributions of those names and finds
73
# neither, however present `/usr/bin/cmake` and `/usr/bin/ninja` are. Skipping
74
# the check is what lets the system tools serve, and `makedepends` above is
75
# then the statement of what a build needs.
76
python -m build --wheel --no-isolation --skip-dependency-check;
77
}
78
79
check() {
80
cd "${srcdir}/${_upstream}";
81
82
# Run against the built wheel and never against the source tree: the extension
83
# exists only once built, so importing from `bindings/python/src` would find
84
# no module to test.
85
local -- staged;
86
staged="$(mktemp -d)";
87
trap 'rm -rf "${staged}"' RETURN;
88
89
python -m installer --destdir="${staged}" dist/*.whl;
90
91
local -- sitedir;
92
sitedir="$(python -c 'import sysconfig; print(sysconfig.get_path("purelib"))')";
93
94
PYTHONPATH="${staged}${sitedir}" python -c 'import ckdl; print(ckdl.parse("node 1"))';
95
}
96
97
package() {
98
cd "${srcdir}/${_upstream}";
99
100
python -m installer --destdir="${pkgdir}" dist/*.whl;
101
102
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING";
103
}
104
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-01 17:48:51 | Low | 1 |