[arch-commits] Commit in python-redis/repos (2 files)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Sat Dec 24 17:55:43 UTC 2016
Date: Saturday, December 24, 2016 @ 17:55:43
Author: bpiotrowski
Revision: 201710
archrelease: copy trunk to community-staging-any
Added:
python-redis/repos/community-staging-any/
python-redis/repos/community-staging-any/PKGBUILD
(from rev 201709, python-redis/trunk/PKGBUILD)
----------+
PKGBUILD | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
Copied: python-redis/repos/community-staging-any/PKGBUILD (from rev 201709, python-redis/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2016-12-24 17:55:43 UTC (rev 201710)
@@ -0,0 +1,64 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at gmail.com>
+# Contributor: Karol 'Kenji Takahashi' Woźniak <kenji.sx>
+# Contributor: Pierre Gueth <pierre.gueth at gmail.com>
+
+pkgbase=python-redis
+pkgname=('python-redis' 'python2-redis')
+_basename=redis
+pkgver=2.10.5
+pkgrel=2
+pkgdesc='The Python interface to the Redis key-value store'
+arch=('any')
+url="http://github.com/andymccurdy/redis-py"
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest' 'python2-pytest' 'redis')
+source=("https://pypi.python.org/packages/source/r/${_basename}/${_basename}-${pkgver}.tar.gz")
+md5sums=('3b26c2b9703b4b56b30a1ad508e31083')
+
+prepare() {
+ cp -a ${_basename}-${pkgver}{,-py2}
+}
+
+build() {
+ cd ${_basename}-${pkgver}
+ python setup.py build
+
+ cd ../${_basename}-${pkgver}-py2
+ python2 setup.py build
+}
+
+check() {
+ _run() {
+ rm -f "$srcdir/redis.pid"
+ redis-server --daemonize yes --pidfile "$srcdir/redis.pid"
+ "$@"
+ kill $(cat "$srcdir/redis.pid")
+ sleep 1 # :/
+ }
+
+ cd ${_basename}-${pkgver}
+ _run py.test
+
+ cd ../${_basename}-${pkgver}-py2
+ _run py.test2
+}
+
+package_python-redis() {
+ depends=('python')
+
+ cd ${_basename}-${pkgver}
+ python setup.py install --root=${pkgdir}/ --optimize=1
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-redis() {
+ depends=('python2')
+
+ cd ${_basename}-${pkgver}-py2
+ python2 setup.py install --root=${pkgdir}/ --optimize=1
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list