[arch-commits] Commit in python-astor/repos (2 files)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Sun Dec 25 17:58:55 UTC 2016
Date: Sunday, December 25, 2016 @ 17:58:54
Author: bpiotrowski
Revision: 202193
archrelease: copy trunk to community-staging-any
Added:
python-astor/repos/community-staging-any/
python-astor/repos/community-staging-any/PKGBUILD
(from rev 202192, python-astor/trunk/PKGBUILD)
----------+
PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
Copied: python-astor/repos/community-staging-any/PKGBUILD (from rev 202192, python-astor/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2016-12-25 17:58:54 UTC (rev 202193)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-astor
+pkgname=('python-astor' 'python2-astor')
+pkgver=0.5
+pkgrel=2
+pkgdesc="Read/rewrite/write Python ASTs"
+arch=('any')
+license=('BSD')
+url="http://astor.rtfd.org/"
+makedepends=('python-setuptools' 'python2-setuptools' 'git')
+checkdepends=('python-nose' 'python2-nose')
+source=("git+https://github.com/berkerpeksag/astor.git#tag=$pkgver")
+sha512sums=('SKIP')
+
+prepare() {
+ cp -a astor{,-py2}
+}
+
+build() {
+ cd "$srcdir/astor"
+ python setup.py build
+
+ cd "$srcdir/astor-py2"
+ python2 setup.py build
+}
+
+check() {
+ # https://github.com/berkerpeksag/astor/issues/48
+ cd "$srcdir/astor"
+ nosetests3 || warning "Tests failed"
+
+ cd "$srcdir/astor-py2"
+ nosetests2
+}
+
+package_python-astor() {
+ depends=('python')
+
+ cd astor
+ python setup.py install --root="${pkgdir}" --optimize=1
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_python2-astor() {
+ depends=('python2')
+
+ cd astor-py2
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
More information about the arch-commits
mailing list