From 54ff17782d28892940033377786b379f3877a287 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Thu, 24 May 2018 19:43:43 +0200 Subject: [PATCH] python-coverage: fix alternatives, build C extensions --- .../patches/no-versioned-coverage.patch | 16 ++++++++++++++++ srcpkgs/python-coverage/template | 15 +++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 srcpkgs/python-coverage/patches/no-versioned-coverage.patch diff --git a/srcpkgs/python-coverage/patches/no-versioned-coverage.patch b/srcpkgs/python-coverage/patches/no-versioned-coverage.patch new file mode 100644 index 0000000000..18e9d541c1 --- /dev/null +++ b/srcpkgs/python-coverage/patches/no-versioned-coverage.patch @@ -0,0 +1,16 @@ +--- setup.py.orig ++++ setup.py +@@ -86,12 +86,9 @@ setup_args = dict( + }, + + entry_points={ +- # Install a script as "coverage", and as "coverage[23]", and as +- # "coverage-2.7" (or whatever). ++ # Install a script as "coverage" + 'console_scripts': [ + 'coverage = coverage.cmdline:main', +- 'coverage%d = coverage.cmdline:main' % sys.version_info[:1], +- 'coverage-%d.%d = coverage.cmdline:main' % sys.version_info[:2], + ], + }, + diff --git a/srcpkgs/python-coverage/template b/srcpkgs/python-coverage/template index fb2ef64a9b..03a427aa69 100644 --- a/srcpkgs/python-coverage/template +++ b/srcpkgs/python-coverage/template @@ -1,11 +1,12 @@ # Template file for 'python-coverage' pkgname=python-coverage version=4.5.1 -revision=1 +revision=2 wrksrc="${pkgname/python-//}-${version}" build_style=python-module pycompile_module="coverage" hostmakedepends="python-setuptools python3-setuptools" +makedepends="python-devel python3-devel" depends="python-setuptools" short_desc="Code coverage testing for Python2" maintainer="maxice8 " @@ -13,17 +14,15 @@ license="Apache-2.0" homepage="https://bitbucket.org/ned/coveragepy" distfiles="${PYPI_SITE}/c/coverage/coverage-${version}.tar.gz" checksum=56e448f051a201c5ebbaa86a5efd0ca90d327204d8b059ab25ad0f35fbfd79f1 -alternatives="python-coverage:coverage:/usr/bin/coverage2" -noarch=yes +alternatives="coverage:coverage:/usr/bin/coverage2" python3-coverage_package() { - noarch=yes pycompile_module="coverage" - short_desc="${short_desc/Python2/Python3}" - alternatives="python-coverage:coverage:/usr/bin/coverage3" depends="python3-setuptools" + short_desc="${short_desc/Python2/Python3}" + alternatives="coverage:coverage:/usr/bin/coverage3" pkg_install() { - vmove "usr/bin/*3*" - vmove /usr/lib/python3* + vmove usr/bin/*3 + vmove usr/lib/python3* } }