[arch-commits] Commit in yapf/repos (community-any community-any/PKGBUILD)
Felix Yan
fyan at archlinux.org
Mon Feb 15 06:34:10 UTC 2016
Date: Monday, February 15, 2016 @ 07:34:09
Author: fyan
Revision: 161594
archrelease: copy trunk to community-any
Added:
yapf/repos/community-any/
yapf/repos/community-any/PKGBUILD
(from rev 161593, yapf/trunk/PKGBUILD)
----------+
PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
Copied: yapf/repos/community-any/PKGBUILD (from rev 161593, yapf/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2016-02-15 06:34:09 UTC (rev 161594)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=yapf
+pkgname=("$pkgbase" "python2-$pkgbase")
+pkgver=0.6.2
+pkgrel=1
+pkgdesc="Python style guide checker"
+arch=('any')
+url="http://github.com/google/yapf"
+license=('Apache')
+makedepends=('python-setuptools' 'python2-setuptools' 'git')
+checkdepends=('python-nose' 'python2-nose')
+source=("git+https://github.com/google/${pkgbase}.git#tag=v$pkgver")
+sha256sums=('SKIP')
+
+prepare() {
+ cp -a $pkgbase{,-py2}
+}
+
+build() {
+ cd "${srcdir}/${pkgbase}"
+ python setup.py build
+
+ cd "${srcdir}/${pkgbase}-py2"
+ python2 setup.py build
+}
+
+check() {
+ cd "${srcdir}/${pkgbase}"
+ nosetests3
+
+ cd "${srcdir}/${pkgbase}-py2"
+ nosetests2
+}
+
+package_yapf() {
+ depends=('python-setuptools')
+
+ cd $pkgbase
+ python setup.py install -O1 --root="$pkgdir/"
+}
+
+package_python2-yapf() {
+ depends=('python2-setuptools')
+
+ cd $pkgbase-py2
+ python2 setup.py install -O1 --root="$pkgdir/"
+ mv "$pkgdir/usr/bin/yapf" "$pkgdir/usr/bin/yapf2"
+}
+
+# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list