summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-automat/PKGBUILD
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-03-23 20:25:28 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-03-23 20:25:28 (GMT)
commitf90addbb739c39ab64c99b679a642a5884521c4a (patch)
treea7c3161dad598adeefc772e127e612a59c1f83c2 /abs/core/python_modules/python-automat/PKGBUILD
parent3b60286025500bb8e6f51256f0acd92a7412297b (diff)
downloadlinhes_pkgbuild-f90addbb739c39ab64c99b679a642a5884521c4a.zip
linhes_pkgbuild-f90addbb739c39ab64c99b679a642a5884521c4a.tar.gz
linhes_pkgbuild-f90addbb739c39ab64c99b679a642a5884521c4a.tar.bz2
python-automat: dep of twisted
Diffstat (limited to 'abs/core/python_modules/python-automat/PKGBUILD')
-rw-r--r--abs/core/python_modules/python-automat/PKGBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/abs/core/python_modules/python-automat/PKGBUILD b/abs/core/python_modules/python-automat/PKGBUILD
new file mode 100644
index 0000000..cde0c88
--- /dev/null
+++ b/abs/core/python_modules/python-automat/PKGBUILD
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
+
+pkgbase=python-automat
+pkgname=('python-automat' 'python2-automat')
+pkgver=0.6.0
+pkgrel=1
+arch=('any')
+license=('MIT')
+pkgdesc="Self-service finite-state machines for the programmer on the go."
+url="https://github.com/glyph/automat"
+makedepends=('python-setuptools-scm' 'python2-setuptools-scm' 'm2r' 'python2-m2r' 'python-attrs'
+ 'python2-attrs')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/glyph/automat/archive/v$pkgver.tar.gz")
+sha512sums=('18488b7815ee6f1c19db17fef7b63b7c8b46639a7a2cd5060dd611c880d9c7828bf2ebf978c2eef560140b66333a94060d9f77c9e8f89342425229065a0a6f7f')
+
+prepare() {
+ cp -a automat-$pkgver{,-py2}
+
+ # Set version for setuptools_scm
+ export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+}
+
+build() {
+ cd "$srcdir"/automat-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/automat-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/automat-$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/automat-$pkgver-py2
+ python2 setup.py pytest
+}
+
+package_python-automat() {
+ depends=('python-attrs' 'python-setuptools')
+
+ cd automat-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/python-automat/LICENSE
+}
+
+package_python2-automat() {
+ depends=('python2-attrs' 'python2-setuptools')
+
+ cd automat-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/python2-automat/LICENSE
+
+ mv "$pkgdir"/usr/bin/automat-visualize{,2}
+}