From db2fbbbf409f42f9f4fc676ab537fa9c7bfec8da Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Fri, 25 May 2018 11:30:10 +0200 Subject: [PATCH] python-nose2: fix alternatives nosetest != nose2: nosetest is nose. --- .../patches/no-versioned-nose2.patch | 10 ++++++++++ srcpkgs/python-nose2/template | 19 +++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 srcpkgs/python-nose2/patches/no-versioned-nose2.patch diff --git a/srcpkgs/python-nose2/patches/no-versioned-nose2.patch b/srcpkgs/python-nose2/patches/no-versioned-nose2.patch new file mode 100644 index 00000000000..bfe3dfa0c24 --- /dev/null +++ b/srcpkgs/python-nose2/patches/no-versioned-nose2.patch @@ -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') diff --git a/srcpkgs/python-nose2/template b/srcpkgs/python-nose2/template index 483594bd86d..9c842785f2c 100644 --- a/srcpkgs/python-nose2/template +++ b/srcpkgs/python-nose2/template @@ -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 " -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 }