python-coverage: fix alternatives, build C extensions

This commit is contained in:
Alessio Sergi 2018-05-24 19:43:43 +02:00
parent 8e1541e486
commit 54ff17782d
2 changed files with 23 additions and 8 deletions

View file

@ -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],
],
},

View file

@ -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 <thinkabit.ukim@gmail.com>"
@ -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*
}
}