diff options
author | Andrea Pascal | 2019-07-15 15:45:03 -0500 |
---|---|---|
committer | Andrea Pascal | 2019-07-15 15:45:03 -0500 |
commit | 85bc5a3021b4b2b530fc88f8173b85bd14621900 (patch) | |
tree | 39e024073e12b540e4ffbdbe87c6fbf2b96e1b92 /PKGBUILD | |
download | aur-python-demjson-git.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bf806eeb9e26 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Andrea Pascal <andrea@anodium.net> + +pkgname=python-demjson-git +pkgver=r41.5bc6597 +pkgrel=1 +pkgdesc='Python module for JSON data encoding, including jsonlint.' +arch=('any') +url='https://github.com/dmeranda/demjson' +license=('LGPL3') + +provides=('python-demjson' 'python2-demjson') +makedepends=('git' 'python-setuptools' 'python2-setuptools') +checkdepends=('python-pytest' 'python2-pytest') + +source=('git+https://github.com/dmeranda/demjson') +sha512sums=('SKIP') + +prepare() { + cp -a $srcdir/demjson{,-py2} +} + +build() { + cd $srcdir/demjson + 2to3 -w . + python setup.py build + + cd $srcdir/demjson-py2 + python2 setup.py build +} + +check() { + cd $srcdir/demjson + PYTHONPATH=. pytest + + cd $srcdir/demjson-py2 + PYTHONPATH=. pytest2 +} + +package_python-demjson-git() { + depends=('python') + cd $srcdir/demjson + python setup.py install --root="$pkgdir/" --optimize=1 --skip-build +} + +package_python2-demjson-git() { + depends=('python2') + cd $srcdir/demjson-py2 + python setup.py install --root="$pkgdir/" --optimize=1 --skip-build +} |