aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-11-19 12:08:54 +0100
committerLeo <thinkabit.ukim@gmail.com>2019-11-19 12:23:38 +0100
commit2e902a4ceb6ecee443605070ceebed0d6028b6cf (patch)
tree5ec4f2a4a0f7a400942ce2e180261b34dd0853ca
parentace21c5701235f9bd35e6d0d34463d260bfd0c22 (diff)
downloadaports-2e902a4ceb6ecee443605070ceebed0d6028b6cf.tar.bz2
aports-2e902a4ceb6ecee443605070ceebed0d6028b6cf.tar.xz
main/py3-nose: drop python2
-rw-r--r--main/py3-nose/APKBUILD58
1 files changed, 14 insertions, 44 deletions
diff --git a/main/py3-nose/APKBUILD b/main/py3-nose/APKBUILD
index 1875c172dd..6ebb4574e4 100644
--- a/main/py3-nose/APKBUILD
+++ b/main/py3-nose/APKBUILD
@@ -1,16 +1,17 @@
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Eivind Uggedal <eu@eju.no>
# Maintainer:
-pkgname=py-nose
+pkgname=py3-nose
_pkgname=nose
pkgver=1.3.7
-pkgrel=4
-pkgdesc="A Python unittest module"
+pkgrel=5
+pkgdesc="Python3 unittest module"
url="http://readthedocs.org/docs/nose/"
arch="noarch"
license="LGPL-2.0-or-later"
-makedepends="python2-dev python3-dev py-setuptools"
-subpackages="$pkgname-doc py2-$_pkgname:_py2 py3-$_pkgname:_py3"
+depends="python3"
+makedepends="py3-setuptools"
+subpackages="$pkgname-doc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
coverage4-compat.patch
python3.5-compat.patch
@@ -19,34 +20,22 @@ source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname
python3.6-compat.patch"
builddir="$srcdir/$_pkgname-$pkgver"
+replaces="py-nose" # Backwards compatiblity
+provides="py-nose=$pkgver-r$pkgrel" # Backwards compatiblity
+
prepare() {
default_prepare
cd "$builddir"/examples
cat attrib_plugin.py | tr -d '\r' > attrib_plugin.py.fixed
mv attrib_plugin.py.fixed attrib_plugin.py
-
- # Soure files are modified during build with 2to3 tool, so we cannot
- # build it for both Python versions in the same location.
- local python; for python in python2 python3; do
- cp -r "$builddir" "$builddir-$python"
- done
}
build() {
- local python; for python in python2 python3; do
- cd "$builddir"-$python
- $python setup.py build
- done
+ python3 setup.py build
}
check() {
- msg "Testing on python2"
- cd "$builddir-python2"
- python2 selftest.py
-
- msg "Testing on python3"
- cd "$builddir-python3"
(
export PYTHONPATH="$(pwd)/build/lib"
python3 setup.py build_tests
@@ -55,30 +44,11 @@ check() {
}
package() {
- cd "$builddir"
- install -D -m 644 nosetests.1 "$pkgdir"/usr/share/man/man1/nosetests.1
-}
-
-_py2() {
- replaces="$pkgname"
- _py python2
- rm "$subpkgdir"/usr/bin/nosetests
-}
-
-_py3() {
- _py python3
-}
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
-_py() {
- local python="$1"
- pkgdesc="$pkgdesc (for $python)"
- depends="$python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
-
- cd "$builddir"-$python
-
- $python setup.py install --prefix=/usr --root="$subpkgdir"
- rm -rf "$subpkgdir"/usr/man
+ # setup.py installs to "$pkgdir"/usr/man/man1
+ install -D -m 644 nosetests.1 "$pkgdir"/usr/share/man/man1/nosetests.1
+ rm -rf "$pkgdir"/usr/man
}
sha512sums="e65c914f621f8da06b9ab11a0ff2763d6e29b82ce2aaed56da0e3773dc899d9deb1f20015789d44c65a5dad7214520f5b659b3f8d7695fb207ad3f78e5cf1b62 nose-1.3.7.tar.gz