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

Massimiliano Torromeo mtorromeo at archlinux.org
Mon Mar 9 08:49:51 UTC 2020


    Date: Monday, March 9, 2020 @ 08:49:51
  Author: mtorromeo
Revision: 592755

upgpkg: python-ujson 2.0.1-1

Modified:
  python-ujson/trunk/PKGBUILD

----------+
 PKGBUILD |   27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-09 08:01:46 UTC (rev 592754)
+++ PKGBUILD	2020-03-09 08:49:51 UTC (rev 592755)
@@ -4,18 +4,20 @@
 pkgbase=python-ujson
 pkgname=('python-ujson' 'python2-ujson')
 _pkgname=ultrajson
-pkgver=1.35
-pkgrel=6
+pkgver=2.0.1
+pkgrel=1
 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')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pip' 'python2-pip')
+checkdepends=('python-six' 'python-pytest')
+source=(https://github.com/esnme/ultrajson/archive/$pkgver/$pkgname-$pkgver.tar.gz)
+sha512sums=('ae70b3560a04b7b60a7bf640745aa6505e222d09f8719d5b328a612ff5194e57ee890e80c83be98887f11db97d326c584c8af3464b289179385b0635c6fb047f')
 
 prepare() {
+  sed '/setup_requires=\["setuptools_scm"\],/d' -i ${_pkgname}-${pkgver}/setup.py
+  sed "s/{version}/$pkgver/" ${_pkgname}-${pkgver}/python/version_template.h > ${_pkgname}-${pkgver}/python/version.h
   cp -ra ${_pkgname}-${pkgver}{,-py2}
 }
 
@@ -31,16 +33,9 @@
 }
 
 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
-  )
+  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}" pytest
 }
 
 package_python-ujson() {



More information about the arch-commits mailing list