[arch-commits] Commit in python-logilab-common/repos (2 files)

Felix Yan fyan at archlinux.org
Sat Sep 19 09:57:00 UTC 2015


    Date: Saturday, September 19, 2015 @ 11:57:00
  Author: fyan
Revision: 246586

archrelease: copy trunk to staging-any

Added:
  python-logilab-common/repos/staging-any/
  python-logilab-common/repos/staging-any/PKGBUILD
    (from rev 246585, python-logilab-common/trunk/PKGBUILD)

----------+
 PKGBUILD |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

Copied: python-logilab-common/repos/staging-any/PKGBUILD (from rev 246585, python-logilab-common/trunk/PKGBUILD)
===================================================================
--- staging-any/PKGBUILD	                        (rev 0)
+++ staging-any/PKGBUILD	2015-09-19 09:57:00 UTC (rev 246586)
@@ -0,0 +1,69 @@
+# $Id$
+# Maintainer: Angel Velasquez <angvp at archlinux.org>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Stéphane Gaudreault <stephane at archlinux.org>
+# Contributor: Alexander Fehr <pizzapunk gmail com>
+
+pkgbase=python-logilab-common
+pkgname=('python2-logilab-common' 'python-logilab-common')
+pkgver=1.0.2
+pkgrel=2
+pkgdesc="Useful miscellaneous modules used by Logilab projects"
+arch=('any')
+url="http://www.logilab.org/project/logilab-common"
+license=('LGPL')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-six' 'python2-six' 'python-pytz' 'python2-pytz' 'python2-egenix-mx-base')
+source=("https://pypi.python.org/packages/source/l/logilab-common/logilab-common-$pkgver.tar.gz")
+sha1sums=('e368d8c458b8e7e0086dd9f8939d636aab4f1e76')
+
+prepare() {
+  cp -a logilab-common-${pkgver}{,-py3}
+}
+
+build() {
+  cd logilab-common-${pkgver}
+  python2 setup.py build
+
+  cd ../logilab-common-${pkgver}-py3
+  python3 setup.py build
+}
+
+check() {
+  cd logilab-common-${pkgver}
+  # Hack to make it importable at this stage
+  touch build/lib/logilab/__init__.py
+  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python2 bin/pytest || warning "Tests failed"
+  rm build/lib/logilab/__init__.py
+
+  cd ../logilab-common-${pkgver}-py3
+  touch build/lib/logilab/__init__.py
+  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python3 bin/pytest
+  rm build/lib/logilab/__init__.py
+}
+
+package_python2-logilab-common() {
+  depends=('python2')
+  optdepends=('python2-six: for logilab.common.testlib')
+
+  cd "${srcdir}"/logilab-common-${pkgver}
+
+  python2 setup.py install --optimize=1 --skip-build --prefix=/usr --root="${pkgdir}"
+
+  mv "${pkgdir}"/usr/bin/pytest{,2}
+
+  # fix permissions ...
+  find "${pkgdir}" -type f -exec chmod +r {} \;
+}
+
+package_python-logilab-common() {
+  depends=('python')
+  optdepends=('python-six: for logilab.common.testlib')
+
+  cd "${srcdir}"/logilab-common-${pkgver}-py3
+
+  python3 setup.py install --optimize=1 --skip-build --prefix=/usr --root="${pkgdir}"
+
+  # fix permissions ...
+  find "${pkgdir}" -type f -exec chmod +r {} \;
+}



More information about the arch-commits mailing list