[arch-commits] Commit in python-orjson/trunk (PKGBUILD)

David Runge dvzrv at gemini.archlinux.org
Sat Apr 16 00:15:31 UTC 2022


    Date: Saturday, April 16, 2022 @ 00:15:31
  Author: dvzrv
Revision: 1186638

upgpkg: python-orjson 3.6.8-1: Upgrade to 3.6.8.

Remove unneeded quotes and curly braces.
Switch to python-installer to install wheels.
Simplify pytest call in check().
Add debug package.

Modified:
  python-orjson/trunk/PKGBUILD

----------+
 PKGBUILD |   31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-15 23:36:42 UTC (rev 1186637)
+++ PKGBUILD	2022-04-16 00:15:31 UTC (rev 1186638)
@@ -2,7 +2,7 @@
 
 _name=orjson
 pkgname=python-orjson
-pkgver=3.6.7
+pkgver=3.6.8
 pkgrel=1
 pkgdesc="Fast, correct Python JSON library supporting dataclasses and datetimes"
 arch=(x86_64)
@@ -9,30 +9,31 @@
 url="https://github.com/ijl/orjson"
 license=(Apache MIT)
 depends=(python)
-makedepends=(maturin python-pip rust)
+makedepends=(maturin python-installer rust)
 checkdepends=(python-arrow python-pendulum python-psutil python-pytest
 python-pytz python-xxhash)
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ijl/${_name}/archive/${pkgver}.tar.gz")
-sha512sums=('5fd7d354f19a01a72218bca4bb7d767ebb73cc79398c5e32c482fed65a93d9f98d58835ebaa0c5e85a975e5eb29d2522a1051bad8f03de8bc227dc2838b8a72b')
-b2sums=('2d666885420745d1e783b1d2795bd9814530447818e14f7ea4203a225849869a30962da9a377a86af1f012e3119b9377a723ebf08cf61127b5e50bd3125bdc4a')
+options=(debug)
+source=($pkgname-$pkgver.tar.gz::https://github.com/ijl/$_name/archive/$pkgver.tar.gz)
+sha512sums=('d929e26f98c5a50ccc45f782b0a7de85e68cc8631597f7c27262a35fa15d5d8c30a5493ab67279d5ea691562a572b0001509b809440c0a018cca1e99d665937d')
+b2sums=('520f038aaf058e2ddd6e41575d8fd6b88111a1627fd9000800bf695385a6292ce73911d37d268878ac6e08f3a84d5dc46eeb8ba7183d8bc5d0daee5b93a7e034')
 
 build() {
-  cd "${_name}-${pkgver}"
+  cd $_name-$pkgver
   maturin build --no-sdist --release --strip
 }
 
 check() {
-  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
-  cd "${_name}-${pkgver}"
-  mkdir -vp testdir
+  local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
 
-  PIP_CONFIG_FILE=/dev/null pip install --isolated --root="testdir" --ignore-installed --no-deps target/wheels/*.whl
-  PYTHONPATH="testdir/usr/lib/python${python_version}/site-packages:${PYTHONPATH}" pytest -v
+  cd $_name-$pkgver
+  python -m installer --destdir=test_dir target/wheels/*.whl
+  export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
+  pytest -vv
 }
 
 package() {
-  cd "${_name}-${pkgver}"
-  PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps target/wheels/*.whl
-  install -vDm 644 {CHANGELOG,README}.md -t "${pkgdir}/usr/share/doc/${pkgname}"
-  install -vDm 644 LICENSE-* -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" target/wheels/*.whl
+  install -vDm 644 {CHANGELOG,README}.md -t "$pkgdir/usr/share/doc/$pkgname/"
+  install -vDm 644 LICENSE-* -t "$pkgdir/usr/share/licenses/$pkgname/"
 }



More information about the arch-commits mailing list