Date: Thursday, February 13, 2020 @ 14:09:09 Author: felixonmars Revision: 570434
upgpkg: python-jsonschema 3.2.0-2: remove python2 sibling Modified: python-jsonschema/trunk/PKGBUILD ----------+ PKGBUILD | 50 ++++++++++---------------------------------------- 1 file changed, 10 insertions(+), 40 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-02-13 14:07:40 UTC (rev 570433) +++ PKGBUILD 2020-02-13 14:09:09 UTC (rev 570434) @@ -3,66 +3,36 @@ # Contributor: Bogdan Szczurek <thebod...@gmail.com> # Contributor: Ismo Toijala <ismo.toij...@gmail.com> -pkgbase=python-jsonschema -pkgname=('python-jsonschema' 'python2-jsonschema') +pkgname=python-jsonschema pkgver=3.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="An implementation of JSON Schema validation for Python" arch=('any') url="https://pypi.python.org/pypi/jsonschema" license=('MIT') -makedepends=('python-attrs' 'python2-attrs' 'python-importlib-metadata' 'python2-importlib-metadata' - 'python-pyrsistent' 'python2-pyrsistent' 'python2-functools32' 'python-setuptools-scm' - 'python2-setuptools-scm') -checkdepends=('python-twisted' 'python2-twisted' 'python-idna' 'python2-idna' 'python-jsonpointer' - 'python2-jsonpointer' 'python-strict-rfc3339' 'python2-strict-rfc3339' - 'python-rfc3987' 'python2-rfc3987' 'python-webcolors' 'python2-webcolors') -source=("$pkgbase-$pkgver.tar.bz2::https://github.com/Julian/jsonschema/archive/v$pkgver.tar.gz") +depends=('python-attrs' 'python-importlib-metadata' 'python-pyrsistent' 'python-setuptools') +makedepends=('python-setuptools-scm') +checkdepends=('python-twisted' 'python-idna' 'python-jsonpointer' 'python-strict-rfc3339' + 'python-rfc3987' 'python-webcolors') +source=("$pkgname-$pkgver.tar.bz2::https://github.com/Julian/jsonschema/archive/v$pkgver.tar.gz") sha512sums=('a575e9e7b0668220854e7ae45f2afd433643c3f0bfeb9769413cfc072ae01513a8d97bddbb6317f42348e09081e72bbad801d00ee5e3c0ac840bd19e934955cd') export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver -prepare() { - cp -a jsonschema-$pkgver{,-py2} - find jsonschema-$pkgver-py2 -name \*.py -exec sed -i '1s/python$/&2/' {} + -} - build() { - cd "$srcdir"/jsonschema-$pkgver + cd jsonschema-$pkgver python setup.py build - - cd "$srcdir"/jsonschema-$pkgver-py2 - python2 setup.py build } check() { - cd "$srcdir"/jsonschema-$pkgver + cd jsonschema-$pkgver python setup.py install --root="$PWD/tmp_install" --optimize=1 PYTHONPATH="$PWD/tmp_install/usr/lib/python3.8/site-packages" JSON_SCHEMA_TEST_SUITE=json trial3 jsonschema python -m doctest README.rst - - cd "$srcdir"/jsonschema-$pkgver-py2 - python2 setup.py install --root="$PWD/tmp_install" --optimize=1 - PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages" JSON_SCHEMA_TEST_SUITE=json trial jsonschema - python2 -m doctest README.rst } -package_python-jsonschema() { - depends=('python-attrs' 'python-importlib-metadata' 'python-pyrsistent' 'python-setuptools') - +package() { cd jsonschema-$pkgver python setup.py install --root="$pkgdir" --optimize=1 install -D -m644 json/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } - -package_python2-jsonschema() { - depends=('python2-attrs' 'python2-importlib-metadata' 'python2-pyrsistent' 'python2-setuptools' - 'python2-functools32') - - cd jsonschema-$pkgver-py2 - python2 setup.py install --root="$pkgdir" --optimize=1 - install -D -m644 json/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE - - mv "$pkgdir"/usr/bin/jsonschema{,2} -} -