void-packages/srcpkgs/python-pbr/template

56 lines
1.2 KiB
Text
Raw Normal View History

# Template file for 'python-pbr'
pkgname=python-pbr
2014-12-28 19:15:16 +00:00
version=0.10.7
revision=2
noarch=yes
2014-09-09 22:47:37 +00:00
wrksrc="pbr-${version}"
python_versions="2.7 3.4"
2014-12-20 17:10:04 +00:00
hostmakedepends="python-setuptools python3.4-setuptools python-pip python3.4-pip"
2014-12-14 08:55:58 +00:00
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"
2014-12-14 08:55:58 +00:00
distfiles="${PYPI_SITE}/p/pbr/pbr-${version}.tar.gz"
2014-12-28 19:15:16 +00:00
checksum=3219912992192c68d21885409ff853ab97b19559c6b5f9f76fd84f06b00f7a27
2014-12-20 17:10:04 +00:00
post_extract() {
2014-12-28 19:15:16 +00:00
cp -a ${wrksrc} /tmp/pbr-2.7
cp -a ${wrksrc} /tmp/pbr-3.4
mv /tmp/pbr-{2.7,3.4} ${wrksrc}
2014-12-20 17:10:04 +00:00
}
pre_build() {
2014-12-28 19:15:16 +00:00
cd ${wrksrc}/pbr-3.4
sed -i '/console_scripts =/{n;s,pbr =,pbr3 =,}' setup.cfg
2014-12-20 17:10:04 +00:00
}
do_build() {
2014-12-28 19:15:16 +00:00
cd ${wrksrc}/pbr-2.7
2014-12-20 17:10:04 +00:00
python setup.py build
2014-12-28 19:15:16 +00:00
cd ${wrksrc}/pbr-3.4
2014-12-20 17:10:04 +00:00
python3.4 setup.py build
}
do_install() {
2014-12-28 19:15:16 +00:00
cd ${wrksrc}/pbr-2.7
2014-12-20 17:10:04 +00:00
python setup.py install --root=${DESTDIR}
2014-12-28 19:15:16 +00:00
cd ${wrksrc}/pbr-3.4
2014-12-20 17:10:04 +00:00
python3.4 setup.py install --root=${DESTDIR}
}
python3.4-pbr_package() {
noarch=yes
2014-12-14 08:55:58 +00:00
depends="python3.4-pip"
pycompile_version="3.4"
pycompile_module="pbr"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
2014-12-20 17:10:04 +00:00
vmove usr/bin/pbr3
vmove usr/lib/python3.4
}
}