[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Wed May 23 17:16:03 UTC 2018


    Date: Wednesday, May 23, 2018 @ 17:16:01
  Author: felixonmars
Revision: 328378

addpkg: python-flex 6.13.1-1

Added:
  python-flex/
  python-flex/repos/
  python-flex/trunk/
  python-flex/trunk/PKGBUILD

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

Added: python-flex/trunk/PKGBUILD
===================================================================
--- python-flex/trunk/PKGBUILD	                        (rev 0)
+++ python-flex/trunk/PKGBUILD	2018-05-23 17:16:01 UTC (rev 328378)
@@ -0,0 +1,60 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-flex
+pkgname=(python-flex python2-flex)
+pkgver=6.13.1
+pkgrel=1
+pkgdesc="Swagger schema validator"
+url="https://github.com/pipermerriam/flex"
+license=('BSD')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-six' 'python2-six' 'python-yaml'
+             'python2-yaml' 'python-validate-email' 'python2-validate-email' 'python-rfc3987'
+             'python2-rfc3987' 'python-requests' 'python2-requests' 'python-strict-rfc3339'
+             'python2-strict-rfc3339' 'python-click' 'python2-click' 'python-jsonpointer'
+             'python2-jsonpointer')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-factory-boy'
+              'python2-factory-boy' 'python-responses' 'python2-responses' 'python-pytest-httpbin'
+              'python2-pytest-httpbin')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/pipermerriam/flex/archive/v$pkgver.tar.gz")
+sha512sums=('f426a6236703be1714b01fe176c15768694a0381a208892bc41d9efcd1cc9dd4918d680991f9ea73ffee6d744e7882f2d39e59b66dd65d487d1dcf38153bc0fb')
+
+prepare() {
+  sed -i 's/<2/<3/' flex-$pkgver/setup.py
+  cp -a flex-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/flex-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/flex-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/flex-$pkgver
+  python setup.py pytest
+
+  cd "$srcdir"/flex-$pkgver-py2
+  python2 setup.py pytest
+}
+
+package_python-flex() {
+  depends=('python')
+
+  cd flex-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-flex() {
+  depends=('python2')
+
+  cd flex-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  mv "$pkgdir"/usr/bin/swagger-flex{,2}
+}


Property changes on: python-flex/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property



More information about the arch-commits mailing list