mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-26 20:02:30 +01:00
60 lines
1.5 KiB
Plaintext
60 lines
1.5 KiB
Plaintext
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
|
|
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
|
|
pkgname=pytest
|
|
pkgver=3.0.6
|
|
pkgrel=0
|
|
pkgdesc="A python test library"
|
|
url="http://pytest.org"
|
|
arch="noarch"
|
|
license="MIT"
|
|
depends="py3-$pkgname"
|
|
makedepends="python2-dev py-setuptools python3-dev"
|
|
subpackages="py3-$pkgname:_py3 py2-$pkgname:_py2"
|
|
source="https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz"
|
|
builddir="$srcdir/$pkgname-$pkgver"
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
python2 setup.py build || return 1
|
|
python3 setup.py build || return 1
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"/usr/bin
|
|
|
|
local name; for name in py.test pytest; do
|
|
ln -s $name-3 "$pkgdir"/usr/bin/$name || return 1
|
|
done
|
|
}
|
|
|
|
_py2() {
|
|
replaces="$pkgname"
|
|
depends="py2-py"
|
|
_py python2
|
|
}
|
|
|
|
_py3() {
|
|
depends="py3-py"
|
|
_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" || return 1
|
|
done
|
|
}
|
|
|
|
md5sums="6639592fa430567d024189f097fcdbd7 pytest-3.0.6.tar.gz"
|
|
sha256sums="643434a9f1a188271da35e20064cb8b6c5440976c5bb541dc7b5b0e3cf75d940 pytest-3.0.6.tar.gz"
|
|
sha512sums="0e983f1f52c18327537d20be30425f4c74037d1fbf6b4aedf2646cf21d450fa9b2b20625f26f5db759b4fe1fd28c6640cb1df88e667efaeea6642e7f02f01e06 pytest-3.0.6.tar.gz"
|