[arch-commits] Commit in python-couchdb/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Mon Dec 26 03:46:12 UTC 2016
Date: Monday, December 26, 2016 @ 03:46:11
Author: felixonmars
Revision: 202483
archrelease: copy trunk to community-staging-any
Added:
python-couchdb/repos/community-staging-any/
python-couchdb/repos/community-staging-any/PKGBUILD
(from rev 202482, python-couchdb/trunk/PKGBUILD)
----------+
PKGBUILD | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
Copied: python-couchdb/repos/community-staging-any/PKGBUILD (from rev 202482, python-couchdb/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2016-12-26 03:46:11 UTC (rev 202483)
@@ -0,0 +1,73 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Aaron DeVore <aaron.devore at gmail.com>
+# Contributor: Byron Clark <byron at theclarkfamily.name>
+# Contributor: Guan 'kuno' Qing <neokuno AT gmail DOT com>
+
+pkgbase=python-couchdb
+pkgname=(python-couchdb python2-couchdb)
+pkgver=1.1
+_commit=38f48c6d13cce15112f93fa97b4b8b67fb857632
+pkgrel=2
+pkgdesc="Python library for working with CouchDB"
+url="https://github.com/djc/couchdb-python/"
+license=('BSD')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools' 'git')
+checkdepends=('python-pifpaf' 'couchdb')
+source=("git+https://github.com/djc/couchdb-python.git#commit=$_commit")
+md5sums=('SKIP')
+
+prepare() {
+ cp -a couchdb-python{,-py2}
+
+ cd "$srcdir"/couchdb-python-py2
+ sed -i 's/python /python2 /' Makefile
+ find . -name "*.py" -exec \
+ sed -i '1s|env python$|env python2|' {} \;
+}
+
+build() {
+ cd "$srcdir"/couchdb-python
+ python setup.py build
+
+ cd "$srcdir"/couchdb-python-py2
+ python2 setup.py build
+}
+
+check() {
+ # New couchdb doesn't provide /usr/bin/couchdb
+ export PATH="$PATH:/usr/lib/couchdb/bin"
+
+ cd "$srcdir"/couchdb-python
+ pifpaf run couchdb python setup.py test || warning "python 3 tests failed"
+
+ cd "$srcdir"/couchdb-python-py2
+ pifpaf run couchdb python2 setup.py test
+}
+
+package_python-couchdb() {
+ depends=('python-setuptools')
+
+ cd couchdb-python
+ python setup.py install --root="$pkgdir" --optimize=1
+
+ install -D -m644 "COPYING" \
+ "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+package_python2-couchdb() {
+ depends=('python2-setuptools')
+
+ cd couchdb-python-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ install -D -m644 "COPYING" \
+ "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+
+ for name in couchdb-dump couchdb-load couchdb-replicate couchpy couchdb-load-design-doc; do
+ mv "$pkgdir/usr/bin/$name"{,2}
+ done
+}
+
+# vim:ts=2:sw=2:et
More information about the arch-commits
mailing list