Date: Monday, August 19, 2019 @ 03:48:55 Author: felixonmars Revision: 500126
addpkg: python-xmlschema 1.0.13-1 Added: python-xmlschema/ python-xmlschema/repos/ python-xmlschema/trunk/ python-xmlschema/trunk/PKGBUILD ----------+ PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) Added: python-xmlschema/trunk/PKGBUILD =================================================================== --- python-xmlschema/trunk/PKGBUILD (rev 0) +++ python-xmlschema/trunk/PKGBUILD 2019-08-19 03:48:55 UTC (rev 500126) @@ -0,0 +1,37 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgname=python-xmlschema +pkgver=1.0.13 +pkgrel=1 +pkgdesc="An XML Schema validator and decoder" +url="https://github.com/sissaschool/xmlschema" +license=('MIT') +arch=('any') +depends=('python-elementpath') +makedepends=('python-setuptools') +checkdepends=('python-lxml') +source=("$pkgname-$pkgver.tar.gz::https://github.com/sissaschool/xmlschema/archive/v$pkgver.tar.gz") +sha512sums=('5767055f9b545afe4436aec40ce6bd6e0129e6becdd9f25153dab834a778de2db64e9fb38c4350758c507535c4e311530ab128c54ee2d9835bf2fb8ccb57f5c5') + +prepare() { + sed -i 's/~=/>=/' xmlschema-$pkgver/setup.py +} + +build() { + cd xmlschema-$pkgver + python setup.py build +} + +check() { + cd xmlschema-$pkgver + python -c "import xmlschema.codepoints; xmlschema.codepoints.save_unicode_categories()" + cp xmlschema/unicode_categories.json build/lib/xmlschema/ + PYTHONPATH="$PWD/build/lib" python xmlschema/tests/test_all.py +} + +package() { + cd xmlschema-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 + + install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ +}