blob: 1e94cb449e0f687f3614e676297f83e4faa09da8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/mkpkg
# description: Meson PEP 517 Python build backend
# url: https://pypi.org/project/meson-python/
name=py-meson_python
_name=meson_python
version=0.22.0
release=1
depends=(python3 meson patchelf py-packaging py-pyproject_metadata)
makedeps=(py-installer py-build)
source=(https://github.com/mesonbuild/meson-python/archive/$version.tar.gz)
sha256sums=(
"238f3f795a70f53a37178097dc6c169ab2b36cd3042e2a234b0352216a41a44b"
)
build() {
cd meson-python-$version
# Remove ninja build dep from pyproject.toml — not needed for wheel build
sed -e '/ninja/d' -i pyproject.toml
# Bootstrap: PYTHONPATH=. makes mesonpy importable from source tree.
# No pre-installed meson-python needed.
PYTHONPATH=. /usr/bin/python3 -m build --no-isolation --wheel
_pyver=$(/usr/bin/python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
_sitedir="$PKG/usr/lib/python${_pyver}/site-packages"
install -dm755 "$_sitedir"
/usr/bin/python3 -m installer --destdir "$PKG" --prefix /usr dist/*.whl
/usr/bin/python3 -OO -m compileall -b -q "$_sitedir"
find "$_sitedir" -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find "$_sitedir" -name "*.exe" -delete
}
signify() {
untrusted comment: public key
RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}
# vim: filetype=sh
|