diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-19 12:55:39 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-19 13:00:04 +0000 |
commit | 2b6f99f1e0d478cde69b1d7a0976030721b5cb16 (patch) | |
tree | 6068e142639cc6c729172ff4c05e1415111daacd /community/pytest/APKBUILD | |
parent | cb41de06f150c8b1ea8e9a1e801565ad48570c2e (diff) | |
download | aports-2b6f99f1e0d478cde69b1d7a0976030721b5cb16.tar.bz2 aports-2b6f99f1e0d478cde69b1d7a0976030721b5cb16.tar.xz |
community/pytest: moved from testing
Diffstat (limited to 'community/pytest/APKBUILD')
-rw-r--r-- | community/pytest/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/community/pytest/APKBUILD b/community/pytest/APKBUILD new file mode 100644 index 0000000000..e8f352d3cf --- /dev/null +++ b/community/pytest/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Fabian Affolter <fabian@affolter-engineering.ch> +# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> +pkgname=pytest +_pkgname=pytest +pkgver=2.6.1 +pkgrel=1 +pkgdesc="A python test library" +url="http://pytest.org" +arch="noarch" +license="MIT" +depends="" +depends_dev="" +makedepends="python-dev py-setuptools python3-dev" +install="" +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" + python setup.py build || return 1 + python3 setup.py build || return 1 +} + +package() { + cd "$builddir" + python setup.py install --root=$pkgdir/ --optimize=1 || return 1 + python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1 +} + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))') + + mkdir -p "$subpkgdir"${dir} + mv "$pkgdir"${dir}/* "$subpkgdir"${dir} +} + +_py2() { + _py python2 + replaces="$pkgname" +} + +_py3() { + _py python3 +} + + +md5sums="bb353f6cf6d9ff83ff7f2dfbeaca47a3 pytest-2.6.1.tar.gz" +sha256sums="994dabcb3149659d259add2aa7d11bff4d35efb7cf4c8233fa9b0b62c1255c3c pytest-2.6.1.tar.gz" +sha512sums="1bfbe27491800943484616a37cfe0f2f8677e3b2a25aee19f842bdf66a9c0205af8c2aecaeb50823970ab9f7042b1bb9115e3c4d689fe568a17a062c50ead829 pytest-2.6.1.tar.gz" |