diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-18 11:18:54 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-18 12:08:59 +0000 |
commit | 2e42e90cd95ae8706a9a3bbfb51f7a0c4c2bc95e (patch) | |
tree | f65c100cefccdd4d4bcc8e79eb4ed3fc0e054fca | |
parent | 8450c9dfcdbc53af350340ebe4600542c58f47dd (diff) | |
download | aports-2e42e90cd95ae8706a9a3bbfb51f7a0c4c2bc95e.tar.bz2 aports-2e42e90cd95ae8706a9a3bbfb51f7a0c4c2bc95e.tar.xz |
testing/pytest: added py2 and py3 package
-rw-r--r-- | testing/pytest/APKBUILD | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/testing/pytest/APKBUILD b/testing/pytest/APKBUILD index 889cf61344..e8f352d3cf 100644 --- a/testing/pytest/APKBUILD +++ b/testing/pytest/APKBUILD @@ -3,39 +3,52 @@ pkgname=pytest _pkgname=pytest pkgver=2.6.1 -pkgrel=0 +pkgrel=1 pkgdesc="A python test library" url="http://pytest.org" arch="noarch" license="MIT" -depends="python" +depends="" depends_dev="" -makedepends="python-dev py-setuptools" +makedepends="python-dev py-setuptools python3-dev" install="" -subpackages="" +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 -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" + cd "$builddir" python setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 + 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" |