Unverified Commit 0c6b4719 authored by prspkt's avatar prspkt

testing/pytest-mock: drop python2

* Modernize.
* Move to community.
parent 8faf6299
# Maintainer: Andy Postnikov <apostnikov@gmail.com> # Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=pytest-mock pkgname=py3-pytest-mock
_pkgname=${pkgname#py-} _pkgname=pytest-mock
pkgver=1.10.0 pkgver=1.10.0
pkgrel=1 pkgrel=1
pkgdesc="Thin-wrapper around the mock package for easier use with py.test" pkgdesc="Thin-wrapper around the mock package for easier use with py.test"
url="https://github.com/pytest-dev/pytest-mock" url="https://github.com/pytest-dev/pytest-mock"
arch="noarch" arch="noarch"
license="MIT" license="MIT"
depends="pytest" depends="py3-pytest"
makedepends="python2-dev python3-dev py-setuptools" makedepends="py3-setuptools"
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver" builddir="$srcdir/$_pkgname-$pkgver"
replaces="pytest-mock" # Backwards compatibility
provides="pytest-mock=$pkgver-r$pkgrel" # Backwards compatibility
build() { build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build python3 setup.py build
} }
check() { check() {
cd "$builddir"
python2 setup.py test
python3 setup.py test python3 setup.py test
} }
package() { package() {
mkdir -p "$pkgdir" python3 setup.py install --prefix=/usr --root="$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
} }
sha512sums="b8afba13da3e598b6493459298e395c0ecc06538733916659191bd5c5c22f40b0e296853ad940c16a6d492fcf46b2daf490ee589661d391e2c7cd1deb84da756 pytest-mock-1.10.0.tar.gz" sha512sums="b8afba13da3e598b6493459298e395c0ecc06538733916659191bd5c5c22f40b0e296853ad940c16a6d492fcf46b2daf490ee589661d391e2c7cd1deb84da756 pytest-mock-1.10.0.tar.gz"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment