[arch-commits] Commit in python-orjson/repos (2 files)
Evangelos Foutras
foutrelis at gemini.archlinux.org
Wed Dec 1 14:53:52 UTC 2021
Date: Wednesday, December 1, 2021 @ 14:53:51
Author: foutrelis
Revision: 1059493
archrelease: copy trunk to community-staging-x86_64
Added:
python-orjson/repos/community-staging-x86_64/
python-orjson/repos/community-staging-x86_64/PKGBUILD
(from rev 1059492, python-orjson/trunk/PKGBUILD)
----------+
PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
Copied: python-orjson/repos/community-staging-x86_64/PKGBUILD (from rev 1059492, python-orjson/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2021-12-01 14:53:51 UTC (rev 1059493)
@@ -0,0 +1,53 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=orjson
+pkgname=python-orjson
+pkgver=3.6.4
+pkgrel=2
+pkgdesc="Fast, correct Python JSON library supporting dataclasses and datetimes"
+arch=('x86_64')
+url="https://github.com/ijl/orjson"
+license=('Apache' 'MIT')
+depends=('python')
+makedepends=('maturin' 'python-pip' '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=('cf4347c13f5799c42170d45cfb8aa960b75f1bf09d4de7a758fee006cf2607c25c67526e2c95907049ab8c35fc12b196074b79d5919dd46fc90921a2090b5e65')
+b2sums=('01548aca9fd04d8f678a79b1f34e5c1336cdedae3cc3ff296f70ae9b975fb75e166987a7410a26194bf7d40e3d8ec46415e7e6138d0632339bb0e607108ae4e2')
+
+prepare() {
+ mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ maturin build --no-sdist \
+ --release \
+ --strip
+}
+
+check() {
+ local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+ cd "$pkgname-$pkgver"
+ mkdir -vp testdir
+ export PIP_CONFIG_FILE=/dev/null
+ pip install --isolated \
+ --root="testdir" \
+ --ignore-installed \
+ --no-deps target/wheels/*.whl
+ export PYTHONPATH="testdir/usr/lib/python${python_version}/site-packages:${PYTHONPATH}"
+ pytest -v
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ export 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}"
+}
More information about the arch-commits
mailing list