python-nose2: fix alternatives

nosetest != nose2: nosetest is nose.
This commit is contained in:
Alessio Sergi 2018-05-25 11:30:10 +02:00
parent c5cb08a4ce
commit db2fbbbf40
2 changed files with 21 additions and 8 deletions

View File

@ -0,0 +1,10 @@
--- setup.py.orig
+++ setup.py
@@ -89,7 +89,6 @@ else:
params['entry_points'] = {
'console_scripts': [
'%s = nose2:discover' % SCRIPT1,
- '%s = nose2:discover' % SCRIPT2,
],
}
params['install_requires'] = parse_requirements('requirements.txt')

View File

@ -1,33 +1,36 @@
# Template file for 'python-nose2'
pkgname=python-nose2
version=0.7.4
revision=1
revision=2
noarch=yes
wrksrc="${pkgname/python-//}-${version}"
build_style=python-module
pycompile_module="nose2"
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools python-coverage python-six python-mock"
short_desc="Nose2 is the next generation of nicer testing for Python2"
short_desc="The next generation of nicer testing (Python2)"
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="2-Clause-BSD"
license="BSD-2-Clause"
homepage="https://github.com/nose-devs/nose2"
distfiles="${PYPI_SITE}/n/nose2/nose2-${version}.tar.gz"
checksum=954a62cfb2d2ac06dad32995cbc822bf00cc11e20d543963515932fd4eff33fa
alternatives="python-nose2:nosetest:/usr/bin/nose2-2.7"
noarch=yes
alternatives="nose2:nose2:/usr/bin/python2-nose2"
post_install() {
vlicense license.txt
# XXX override the default naming scheme
cp -a ${DESTDIR}/usr/bin/nose2 ${DESTDIR}/usr/bin/python3-nose2
mv ${DESTDIR}/usr/bin/nose2 ${DESTDIR}/usr/bin/python2-nose2
}
python3-nose2_package() {
noarch=yes
pycompile_Module="nose2"
pycompile_module="nose2"
short_desc="${short_desc/Python2/Python3}"
depends="python3-setuptools python3-coverage python3-six"
alternatives="python-nose2:nosetest:/usr/bin/nose2-3.6"
alternatives="nose2:nose2:/usr/bin/python3-nose2"
pkg_install() {
vmove "usr/bin/*3*"
vmove usr/bin/python3-nose2
vmove usr/lib/python3*
vlicense license.txt
}