diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-08-29 17:47:29 -0300 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-09-20 11:04:27 +0000 |
commit | c6d12c52b562aea3fad3c22d09edcf4394a6f85b (patch) | |
tree | 5cdeecd7d2143e6c6086ea4c2f26ad1f5a5f749f /main | |
parent | 2cb980b5043cba14ca232df8082ba088fa2b2d4e (diff) | |
download | aports-c6d12c52b562aea3fad3c22d09edcf4394a6f85b.tar.bz2 aports-c6d12c52b562aea3fad3c22d09edcf4394a6f85b.tar.xz |
main/py3-pytest: drop py2
Diffstat (limited to 'main')
-rw-r--r-- | main/py3-pytest/APKBUILD | 48 |
1 files changed, 11 insertions, 37 deletions
diff --git a/main/py3-pytest/APKBUILD b/main/py3-pytest/APKBUILD index 67f2c8e536..5c0bed2121 100644 --- a/main/py3-pytest/APKBUILD +++ b/main/py3-pytest/APKBUILD @@ -1,65 +1,39 @@ # Contributor: Fabian Affolter <fabian@affolter-engineering.ch> # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> -pkgname=pytest +pkgname=py3-pytest pkgver=4.5.0 -pkgrel=2 +pkgrel=3 pkgdesc="A python test library" url="https://docs.pytest.org/en/latest/" arch="noarch" license="MIT" -depends="py3-$pkgname" -_py_depends="py-atomicwrites py-py py-six py-attrs py-more-itertools py-pluggy py-wcwidth" -_py2_depends="${_py_depends//py-/py2-} py2-setuptools py2-funcsigs py2-pathlib2" -_py3_depends="${_py_depends//py-/py3-} py3-setuptools" -makedepends="python2-dev py-setuptools python3-dev $_py2_depends $_py3_depends" -subpackages="py3-$pkgname:_py3 py2-$pkgname:_py2" -source="https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz" +depends="py3-atomicwrites py3-py py3-six py3-attrs py3-more-itertools py3-pluggy py3-wcwidth + py3-setuptools" +source="https://files.pythonhosted.org/packages/source/p/pytest/pytest-$pkgver.tar.gz" +builddir="$srcdir/pytest-$pkgver" + +replaces="pytest" # Backwards compatibility +provides="pytest=$pkgver-r$pkgrel" # Backwards compatibility build() { cd "$builddir" - python2 setup.py build python3 setup.py build } check() { cd "$builddir" - python2 setup.py check python3 setup.py check } package() { + cd "$builddir" mkdir -p "$pkgdir"/usr/bin local name; for name in py.test pytest; do ln -s $name-3 "$pkgdir"/usr/bin/$name done -} -_py2() { - replaces="$pkgname" - depends="$_py2_depends" - _py python2 -} - -_py3() { - depends="$_py3_depends" - _py python3 -} - -_py() { - local python="$1" - local pyver="${1:6:1}" - pkgdesc="$pkgdesc (for $python)" - depends="$depends $python" - install_if="$pkgname=$pkgver-r$pkgrel $python" - - cd "$builddir" - $python setup.py install --prefix=/usr --root="$subpkgdir" - - # Add version suffix to executable files. - local path; for path in "$subpkgdir"/usr/bin/*; do - mv "$path" "$path-$pyver" - done + python3 setup.py install --prefix=/usr --root="$pkgdir" } sha512sums="cbffc6216f83491b1de241058315c116697bfaa5206b5f558192a7f861d43dd036d30d0d689bedae7bdee4f0258dd19ef5827c356e11863dd596a5fabe8249fc pytest-4.5.0.tar.gz" |