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

Evangelos Foutras foutrelis at archlinux.org
Sun Jul 8 13:55:56 UTC 2018


    Date: Sunday, July 8, 2018 @ 13:55:56
  Author: foutrelis
Revision: 354922

archrelease: copy trunk to community-staging-x86_64

Added:
  python-ujson/repos/community-staging-x86_64/
  python-ujson/repos/community-staging-x86_64/PKGBUILD
    (from rev 354921, python-ujson/trunk/PKGBUILD)

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

Copied: python-ujson/repos/community-staging-x86_64/PKGBUILD (from rev 354921, python-ujson/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-07-08 13:55:56 UTC (rev 354922)
@@ -0,0 +1,62 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+pkgbase=python-ujson
+pkgname=('python-ujson' 'python2-ujson')
+_pkgname=ultrajson
+pkgver=1.35
+pkgrel=4
+pkgdesc="Ultra fast JSON encoder and decoder for Python"
+url="https://github.com/esnme/ultrajson"
+arch=('x86_64')
+license=('BSD')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-six' 'python2-six' 'python-pytz' 'python2-pytz' 'python-blist' 'python2-blist' 'python2-unittest2')
+source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/esnme/ultrajson/archive/v${pkgver}.tar.gz)
+sha512sums=('cd5dc8d08e072cf703aec7d689070713f7073c22f13167d7e10a89219179248d6668894c1d742ca658672bb82e1dccbf72e3fd69e036d8cb2ee0ee799d10db11')
+
+prepare() {
+  cp -ra ${_pkgname}-${pkgver}{,-py2}
+}
+
+build() {
+  (cd ${_pkgname}-${pkgver}
+    python setup.py build -b ../buildpy3
+    ln -s ../buildpy3 build
+  )
+  (cd ${_pkgname}-${pkgver}-py2
+    python2 setup.py build -b ../buildpy2
+    ln -s ../buildpy2 build
+  )
+}
+
+check() {
+  (cd ${_pkgname}-${pkgver}
+    local PYTHONVERSION="$(python -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
+    PYTHONPATH="build/lib.linux-${CARCH}-${PYTHONVERSION}" \
+      python tests/tests.py
+  )
+  (cd ${_pkgname}-${pkgver}-py2
+    local PYTHONVERSION="$(python2 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
+    PYTHONPATH="build/lib.linux-${CARCH}-${PYTHONVERSION}" \
+      python2 tests/tests.py
+  )
+}
+
+package_python-ujson() {
+  depends=('python')
+  cd ${_pkgname}-${pkgver}
+  python setup.py install --skip-build -O1 --root="${pkgdir}"
+  install -Dm 644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -Dm 644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README"
+}
+
+package_python2-ujson() {
+  depends=('python2')
+  cd ${_pkgname}-${pkgver}-py2
+  python2 setup.py install --skip-build -O1 --root="${pkgdir}"
+  install -Dm 644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -Dm 644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list