Created
September 16, 2020 22:50
-
-
Save simonpintarelli/383f93be2d2a858e37f2c17a2f3e66bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> | |
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> | |
pkgname=python-ujson | |
_pkgname=ultrajson | |
pkgver=3.2.0 | |
pkgrel=1 | |
pkgdesc="Ultra fast JSON encoder and decoder for Python" | |
url="https://github.com/ultrajson/ultrajson" | |
arch=('x86_64') | |
license=('BSD') | |
depends=('python') | |
makedepends=('python-setuptools' 'python-pip') | |
checkdepends=('python-six' 'python-pytest') | |
source=("${_pkgname}-${pkgver}::git+https://github.com/ultrajson/ultrajson.git#tag=3.2.0") | |
md5sums=('SKIP') | |
sha256sum=('SKIP') | |
# 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 | |
# } | |
build() { | |
cd ${_pkgname}-${pkgver} | |
python setup.py 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}" pytest | |
} | |
package() { | |
cd ${_pkgname}-${pkgver} | |
python setup.py install --skip-build -O1 --root="${pkgdir}" | |
install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}" | |
install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}" | |
} | |
# vim: ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment