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

Jelle van der Waa jelle at archlinux.org
Sun Sep 20 12:27:19 UTC 2015


    Date: Sunday, September 20, 2015 @ 14:27:18
  Author: jelle
Revision: 141259

Python 3.5 rebuild and update of Python-mock to 1.3

Python2-mock now requires python-funcsigs which is in [community]

Modified:
  python-mock/trunk/PKGBUILD

----------+
 PKGBUILD |   25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-09-20 12:18:01 UTC (rev 141258)
+++ PKGBUILD	2015-09-20 12:27:18 UTC (rev 141259)
@@ -4,15 +4,16 @@
 
 pkgbase=python-mock
 pkgname=(python2-mock python-mock)
-pkgver=1.0.1
-pkgrel=4
+pkgver=1.3.0
+pkgrel=1
 pkgdesc='Mocking and Patching Library for Testing'
 url='http://www.voidspace.org.uk/python/mock/'
-makedepends=('python2' 'python')
+makedepends=('python2' 'python' 'python-setuptools' 'python2-setuptools')
+checkdepends=('python-nose' 'python2-nose' 'python-pbr' 'python2-pbr' 'python-six' 'python2-six' 'git')
 license=('BSD')
 arch=('any')
 source=("http://pypi.python.org/packages/source/m/mock/mock-$pkgver.tar.gz")
-md5sums=('c3971991738caa55ec7c356bbc154ee2')
+md5sums=('73ee8a4afb3ff4da1b4afa287f39fdeb')
 
 build() {
   cd "$srcdir"
@@ -26,7 +27,7 @@
 }
 
 package_python-mock() {
-depends=('python')
+depends=('python' 'python-six')
   cd "$srcdir/mock-$pkgver"
   python3 setup.py install --optimize=1 --root="$pkgdir"
   install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
@@ -33,8 +34,20 @@
 }
 
 package_python2-mock() {
-depends=('python2')
+depends=('python2' 'python2-six' 'python2-funcsigs') # Backported Py > 3.3 functionality
   cd "$srcdir/mock2-$pkgver"
   python2 setup.py install --optimize=1 --root="$pkgdir"
   install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
 }
+
+check() {
+  cd "$srcdir/mock2-$pkgver/"
+  sed -i 's/unittest2/unittest/g'  mock/tests/*.py
+
+  echo 'python tests'
+  python -m unittest discover
+  
+  # Does not run because of self.assertRaisesRegex() usage in unitests, which is self.assertRaisesRegexp() in Python 2.7
+  #echo 'python2 tests'
+  #python2 -m unittest discover
+}



More information about the arch-commits mailing list