[arch-commits] Commit in python-orjson/repos (2 files)

David Runge dvzrv at archlinux.org
Tue Apr 21 21:46:32 UTC 2020


    Date: Tuesday, April 21, 2020 @ 21:46:31
  Author: dvzrv
Revision: 617404

archrelease: copy trunk to community-x86_64

Added:
  python-orjson/repos/community-x86_64/
  python-orjson/repos/community-x86_64/PKGBUILD
    (from rev 617403, python-orjson/trunk/PKGBUILD)

----------+
 PKGBUILD |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

Copied: python-orjson/repos/community-x86_64/PKGBUILD (from rev 617403, python-orjson/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2020-04-21 21:46:31 UTC (rev 617404)
@@ -0,0 +1,54 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=orjson
+pkgname=python-orjson
+pkgver=2.6.5
+pkgrel=1
+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' 'rustup')
+checkdepends=('python-arrow' 'python-pendulum' 'python-psutil' 'python-pytest' 'python-pytz')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ijl/${_name}/archive/${pkgver}.tar.gz")
+sha512sums=('a5cfbd3f2912f2c507af1a86fbfc2efbfdbd6430d25b695e0b8abf44745e729695310b380773a6cd9bf28f41898d87324dfe6969167580efc4c0e7f227292046')
+
+prepare() {
+  mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+  cd "$pkgname-$pkgver"
+#  dephell deps convert --from pyproject.toml --to setup.py
+  rustup override set nightly
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  maturin build --release \
+                --strip \
+                --manylinux
+}
+
+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