[arch-commits] Commit in python-mock/trunk (PKGBUILD)
Antonio Rojas
arojas at gemini.archlinux.org
Wed Dec 15 08:51:53 UTC 2021
Date: Wednesday, December 15, 2021 @ 08:51:53
Author: arojas
Revision: 1072950
Drop python2
Modified:
python-mock/trunk/PKGBUILD
----------+
PKGBUILD | 30 ++++--------------------------
1 file changed, 4 insertions(+), 26 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-12-15 08:49:59 UTC (rev 1072949)
+++ PKGBUILD 2021-12-15 08:51:53 UTC (rev 1072950)
@@ -1,14 +1,12 @@
# Maintainer: jelle van der Waa <jelle at vdwaa.nl>
# Contributor: Felix Kaiser <felix.kaiser at fxkr.net>
-pkgbase=python-mock
-pkgname=(python2-mock python-mock)
+pkgname=python-mock
pkgver=3.0.5
-pkgrel=8
+pkgrel=9
pkgdesc='Mocking and Patching Library for Testing'
url='http://www.voidspace.org.uk/python/mock/'
-makedepends=('python2' 'python' 'python-pbr' 'python2-pbr')
-checkdepends=('python2-funcsigs')
+depends=('python' 'python-six' 'python-pbr')
license=('BSD')
arch=('any')
source=(mock-$pkgver.tar.gz::https://github.com/testing-cabal/mock/archive/$pkgver.tar.gz)
@@ -18,17 +16,11 @@
cd "$srcdir/mock-$pkgver"
# use unittest instead of unittest2 as they are the same on recent python*
sed -i 's/unittest2/unittest/g' mock/tests/*.py
-
- cd "$srcdir"
- cp -rf "mock-$pkgver" "mock2-$pkgver"
}
build() {
cd "$srcdir/mock-$pkgver"
python3 setup.py build
-
- cd "$srcdir/mock2-$pkgver"
- python2 setup.py build
}
check() {
@@ -35,24 +27,10 @@
cd "$srcdir/mock-$pkgver"
echo 'python tests'
python -m unittest discover
-
- cd "$srcdir/mock2-$pkgver"
- echo 'python2 tests'
- # Remove Python 3 only test
- rm mock/tests/testhelpers_py3.py
- python2 -m unittest discover
}
-package_python-mock() {
-depends=('python' 'python-six' 'python-pbr')
+package() {
cd "$srcdir/mock-$pkgver"
python3 setup.py install --optimize=1 --root="$pkgdir"
install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
-
-package_python2-mock() {
-depends=('python2' 'python2-six' 'python2-pbr' '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
-}
More information about the arch-commits
mailing list