[arch-commits] Commit in python-voluptuous/repos (2 files)

Felix Yan felixonmars at archlinux.org
Wed Aug 14 04:29:01 UTC 2019


    Date: Wednesday, August 14, 2019 @ 04:29:01
  Author: felixonmars
Revision: 499093

archrelease: copy trunk to community-testing-any

Added:
  python-voluptuous/repos/community-testing-any/
  python-voluptuous/repos/community-testing-any/PKGBUILD
    (from rev 499092, python-voluptuous/trunk/PKGBUILD)

----------+
 PKGBUILD |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

Copied: python-voluptuous/repos/community-testing-any/PKGBUILD (from rev 499092, python-voluptuous/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2019-08-14 04:29:01 UTC (rev 499093)
@@ -0,0 +1,59 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-voluptuous
+pkgname=(python-voluptuous python2-voluptuous)
+pkgver=0.11.7
+pkgrel=1
+pkgdesc="A Python data validation library"
+url="https://github.com/alecthomas/voluptuous"
+license=('BSD')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pypandoc' 'python2-pypandoc')
+checkdepends=('python-nose' 'python2-nose')
+source=("https://pypi.io/packages/source/v/voluptuous/voluptuous-$pkgver.tar.gz")
+sha512sums=('bf0ad4684a4da59b3eccb54f6edfa643eb894076fc50d1bfd4c953de15cfd711a70e8aee685497197eaef24897ae55fb5fb2aec5e2fc9dcf344a6f7c6f569b88')
+
+prepare() {
+  # https://github.com/alecthomas/voluptuous/issues/333
+  rm -r voluptuous-$pkgver/*.egg-info
+
+  # https://github.com/alecthomas/voluptuous/pull/332
+  sed -e "s/'w'/'wb'/" -e "s/.encode('utf-8')//" -e "s/f.write(long_description)/f.write(long_description.encode('utf-8'))/" -i voluptuous-$pkgver/setup.py
+
+  # Python 3.7
+  sed -i '/raise StopIteration/d' voluptuous-$pkgver/voluptuous/schema_builder.py
+
+  cp -a voluptuous-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/voluptuous-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/voluptuous-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/voluptuous-$pkgver
+  python setup.py nosetests
+
+  cd "$srcdir"/voluptuous-$pkgver-py2
+  python2 setup.py nosetests
+}
+
+package_python-voluptuous() {
+  depends=('python')
+
+  cd voluptuous-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+
+package_python2-voluptuous() {
+  depends=('python2')
+
+  cd voluptuous-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}


More information about the arch-commits mailing list