[arch-commits] Commit in python-pycurl/trunk (PKGBUILD)

Felix Yan fyan at nymeria.archlinux.org
Sun Jul 13 16:55:37 UTC 2014


    Date: Sunday, July 13, 2014 @ 18:55:37
  Author: fyan
Revision: 216859

upgpkg: python-pycurl 7.19.5-1

Modified:
  python-pycurl/trunk/PKGBUILD

----------+
 PKGBUILD |   33 ++++++++++++++++++++++++---------
 1 file changed, 24 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-07-13 16:50:58 UTC (rev 216858)
+++ PKGBUILD	2014-07-13 16:55:37 UTC (rev 216859)
@@ -6,40 +6,55 @@
 _pypiname=pycurl
 pkgbase=python-$_pypiname
 pkgname=('python-pycurl' 'python2-pycurl')
-pkgver=7.19.3.1
-pkgrel=2
+pkgver=7.19.5
+pkgrel=1
 arch=('i686' 'x86_64')
 url="http://pycurl.sourceforge.net/"
 license=('LGPL' 'MIT')
 makedepends=('python' 'python2' 'curl' 'git')
+checkdepends=('python-bottle' 'python2-bottle' 'python-nose' 'python2-nose' 'vsftpd')
 source=("git+https://github.com/pycurl/pycurl.git#tag=REL_${pkgver//./_}")
 sha1sums=('SKIP')
 
 prepare() {
-  cp -r ${_pypiname} python2-${_pypiname}
+  cp -r $_pypiname{,-py2}
 
-  cd "${srcdir}/${_pypiname}"
+  cd "$srcdir/$_pypiname"
   find . -name '*.py' -exec sed -i -e "s|#! /usr/bin/env python|#!/usr/bin/env python3|" {} +
     sed -i 's/"share", "doc", PACKAGE/"share", "doc", "python-pycurl"/' setup.py
+  sed -i "s/nosetests/nosetests3/" Makefile
 
-  cd "${srcdir}/python2-${_pypiname}"
+  cd "$srcdir/$_pypiname-py2"
   find . -name '*.py' -exec sed -i -e "s|#! /usr/bin/env python|#!/usr/bin/env python2|" {} +
     sed -i 's/"share", "doc", PACKAGE/"share", "doc", "python2-pycurl"/' setup.py
+  sed -i "s/nosetests/nosetests2/" Makefile
 }
 
 build() {
-  cd "${srcdir}/${_pypiname}"
+  cd "$srcdir/$_pypiname"
+  make
   python3 setup.py build --with-ssl
 
-  cd "${srcdir}/python2-${_pypiname}"
+  cd "$srcdir/$_pypiname-py2"
+  make
   python2 setup.py build --with-ssl
 }
 
+check() {
+  export PYCURL_VSFTPD_PATH=vsftpd
+
+  cd "$srcdir/$_pypiname"
+  PYTHONPATH="$PWD/build/lib.linux-$CARCH-3.4:$PYTHONPATH" make test || warning "Tests failed"
+
+  cd "$srcdir/$_pypiname-py2"
+  PYTHONPATH="$PWD/build/lib.linux-$CARCH-2.7:$PYTHONPATH" make test || warning "Tests failed"
+}
+
 package_python-pycurl() {
   pkgdesc="A Python 3.x interface to libcurl"
   depends=('python' 'curl')
 
-  cd ${_pypiname}
+  cd $_pypiname
   python setup.py install -O1 --root="${pkgdir}"
   install -D -m644 COPYING-MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }
@@ -48,7 +63,7 @@
   pkgdesc="A Python 2.x interface to libcurl"
   depends=('python2' 'curl')
 
-  cd python2-${_pypiname}
+  cd $_pypiname-py2
   python2 setup.py install -O1 --root="${pkgdir}"
   install -D -m644 COPYING-MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }




More information about the arch-commits mailing list