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

Felix Yan fyan at archlinux.org
Sat Sep 19 13:17:58 UTC 2015


    Date: Saturday, September 19, 2015 @ 15:17:57
  Author: fyan
Revision: 140811

archrelease: copy trunk to community-staging-any

Added:
  python-pkginfo/repos/community-staging-any/
  python-pkginfo/repos/community-staging-any/PKGBUILD
    (from rev 140810, python-pkginfo/trunk/PKGBUILD)

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

Copied: python-pkginfo/repos/community-staging-any/PKGBUILD (from rev 140810, python-pkginfo/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2015-09-19 13:17:57 UTC (rev 140811)
@@ -0,0 +1,55 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: eolianoe <eolianoe At GoogleMAIL DoT com>
+# Contributor: Andrey Mikhaylenko <neithere at gmail dot com>
+
+pkgbase=python-pkginfo
+pkgname=(python-pkginfo python2-pkginfo)
+_pypiname=pkginfo
+pkgver=1.2.1
+pkgrel=3
+pkgdesc='Query metadatdata from sdists / bdists / installed packages'
+arch=('any')
+url="https://pypi.python.org/pypi/${_pypiname}"
+license=('PSF')
+makedepends=("python-setuptools" "python2-setuptools")
+checkdepends=("python-nose" "python2-nose" "python-coverage" "python2-coverage")
+source=("http://pypi.python.org/packages/source/${_pypiname:0:1}/${_pypiname}/${_pypiname}-${pkgver}.tar.gz")
+sha256sums=('ad3f6dfe8a831f96a7b56a588ca874137ca102cc6b79fc9b0a1c3b7ab7320f3c')
+
+prepare() {
+  cp -a $_pypiname-$pkgver{,-py2}
+}
+
+build() {
+  cd "${srcdir}/${_pypiname}-${pkgver}"
+  python setup.py build
+
+  cd "${srcdir}/${_pypiname}-${pkgver}-py2"
+  python2 setup.py build
+}
+
+check() {(
+  cd "${srcdir}/${_pypiname}-${pkgver}"
+  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" nosetests3
+
+  cd "${srcdir}/${_pypiname}-${pkgver}-py2"
+  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" nosetests2
+  ) || warning "Tests failed"
+}
+
+package_python-pkginfo() {
+  depends=("python")
+
+  cd "${srcdir}/${_pypiname}-${pkgver}"
+  python setup.py install --root="${pkgdir}" --optimize=1
+}
+
+package_python2-pkginfo() {
+  depends=("python2")
+
+  cd "${srcdir}/${_pypiname}-${pkgver}"
+  python2 setup.py install --root="${pkgdir}" --optimize=1
+
+  mv "$pkgdir/usr/bin/pkginfo"{,2}
+}



More information about the arch-commits mailing list