void-packages/srcpkgs/python-pbr/template
2014-12-21 11:15:56 +01:00

55 lines
1.3 KiB
Text

# Template file for 'python-pbr'
pkgname=python-pbr
version=0.10.5
revision=1
noarch=yes
wrksrc="pbr-${version}"
python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools python-pip python3.4-pip"
depends="python-pip"
pycompile_module="pbr"
short_desc="Python2 build reasonableness"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://pypi.python.org/pypi/pbr"
license="Apache-2.0"
distfiles="${PYPI_SITE}/p/pbr/pbr-${version}.tar.gz"
checksum=e956bf32f40f408e223824ad819e260ba68f40bc626c1dc07c181bc17bb8b696
post_extract() {
cp -a ${wrksrc} /tmp/python2.7-build
cp -a ${wrksrc} /tmp/python3.4-build
mv /tmp/python{2.7,3.4}-build ${wrksrc}
}
pre_build() {
cd ${wrksrc}/python3.4-build
sed -i 's,pbr =,pbr3 =,' setup.cfg
}
do_build() {
cd ${wrksrc}/python2.7-build
python setup.py build
cd ${wrksrc}/python3.4-build
python3.4 setup.py build
}
do_install() {
cd ${wrksrc}/python2.7-build
python setup.py install --root=${DESTDIR}
cd ${wrksrc}/python3.4-build
python3.4 setup.py install --root=${DESTDIR}
}
python3.4-pbr_package() {
noarch=yes
depends="python3.4-pip"
pycompile_version="3.4"
pycompile_module="pbr"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/bin/pbr3
vmove usr/lib/python3.4
}
}