kpcyrd pushed to branch main at Arch Linux / Packaging / Packages / 
python-json-stream-rs-tokenizer


Commits:
ff3e997d by kpcyrd at 2023-08-21T22:50:34+02:00
upgpkg: 0.4.22-2 - switch to `python -m build`

- - - - -


1 changed file:

- PKGBUILD


Changes:

=====================================
PKGBUILD
=====================================
@@ -3,29 +3,38 @@
 _pyname=json-stream-rs-tokenizer
 pkgname=python-${_pyname}
 pkgver=0.4.22
-pkgrel=1
+pkgrel=2
 pkgdesc='Faster tokenizer for the json-stream Python library'
 arch=(x86_64)
 url="https://github.com/smheidrich/py-json-stream-rs-tokenizer";
 license=('MIT')
 depends=('python')
-makedepends=('python-setuptools-rust')
+makedepends=(
+  python-build
+  python-installer
+  python-setuptools-rust
+  python-wheel
+)
 
source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz";)
 
b2sums=('6946e653924716dfe6501ac3d2227122a2beb382354c838d1d335dc22568d7c594b5c008cf82d8d4f5caa95ab5c7e3a15f03b262de5b2097d9c9db0c30be4321')
 
 build() {
   cd "${_pyname}-${pkgver}"
-  python setup.py build
+  python -m build --wheel --no-isolation
 }
 
 check() {
+  local _site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
   cd ${_pyname}-${pkgver}
-  PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-311:$PYTHONPATH" python -c 
'import json_stream_rs_tokenizer'
+  python -m installer --destdir=test_dir dist/*.whl
+
+  PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH" python -c 'import 
json_stream_rs_tokenizer'
 }
 
 package() {
   cd "${_pyname}-${pkgver}"
-  python setup.py install --prefix=/usr --root="${pkgdir}"
+  python -m installer --destdir="${pkgdir}" dist/*.whl
   install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
 }
 



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-json-stream-rs-tokenizer/-/commit/ff3e997dcbaeba2f21e6f4e835957905ee3ed571

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-json-stream-rs-tokenizer/-/commit/ff3e997dcbaeba2f21e6f4e835957905ee3ed571
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to