aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-06-19 11:38:26 +0300
committerprspkt <prspkt@protonmail.com>2019-06-19 11:51:56 +0300
commit0c6b47193b5a4a025f6b34d111e78dba20adc8d0 (patch)
treeadcdc3f13606520865c0d82bd2e019e4179bb358
parent8faf6299e2a8ba608b761f542bde1192416b5965 (diff)
downloadaports-0c6b47193b5a4a025f6b34d111e78dba20adc8d0.tar.gz
aports-0c6b47193b5a4a025f6b34d111e78dba20adc8d0.tar.bz2
aports-0c6b47193b5a4a025f6b34d111e78dba20adc8d0.tar.xz
testing/pytest-mock: drop python2
* Modernize. * Move to community.
-rw-r--r--community/py3-pytest-mock/APKBUILD (renamed from testing/pytest-mock/APKBUILD)37
1 files changed, 8 insertions, 29 deletions
diff --git a/testing/pytest-mock/APKBUILD b/community/py3-pytest-mock/APKBUILD
index 34fa493280..4c0a949af1 100644
--- a/testing/pytest-mock/APKBUILD
+++ b/community/py3-pytest-mock/APKBUILD
@@ -1,51 +1,30 @@
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
-pkgname=pytest-mock
-_pkgname=${pkgname#py-}
+pkgname=py3-pytest-mock
+_pkgname=pytest-mock
pkgver=1.10.0
pkgrel=1
pkgdesc="Thin-wrapper around the mock package for easier use with py.test"
url="https://github.com/pytest-dev/pytest-mock"
arch="noarch"
license="MIT"
-depends="pytest"
-makedepends="python2-dev python3-dev py-setuptools"
-subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+depends="py3-pytest"
+makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
+replaces="pytest-mock" # Backwards compatibility
+provides="pytest-mock=$pkgver-r$pkgrel" # Backwards compatibility
+
build() {
- cd "$builddir"
- python2 setup.py build
python3 setup.py build
}
check() {
- cd "$builddir"
- python2 setup.py test
python3 setup.py test
}
package() {
- mkdir -p "$pkgdir"
-}
-
-_py() {
- local python=$1
- pkgdesc="$pkgdesc - $python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
-
- cd "$builddir"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
-}
-
-_py2() {
- depends="py2-${depends//py-/py2-} py2-mock"
- _py python2
-}
-
-_py3() {
- depends="py3-${depends//py-/py3-}"
- _py python3
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="b8afba13da3e598b6493459298e395c0ecc06538733916659191bd5c5c22f40b0e296853ad940c16a6d492fcf46b2daf490ee589661d391e2c7cd1deb84da756 pytest-mock-1.10.0.tar.gz"