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

Felix Yan fyan at archlinux.org
Tue Jul 14 08:49:13 UTC 2015


    Date: Tuesday, July 14, 2015 @ 10:49:13
  Author: fyan
Revision: 242199

archrelease: copy trunk to testing-any

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

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

Copied: python-logilab-common/repos/testing-any/PKGBUILD (from rev 242198, python-logilab-common/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2015-07-14 08:49:13 UTC (rev 242199)
@@ -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=1
+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