50 lines
1.1 KiB
Bash
50 lines
1.1 KiB
Bash
# Template file for 'python-pbr'
|
|
pkgname=python-pbr
|
|
version=1.3.0
|
|
revision=1
|
|
noarch=yes
|
|
wrksrc="pbr-${version}"
|
|
python_versions="2.7 3.4"
|
|
hostmakedepends="python-setuptools python3.4-setuptools"
|
|
depends="python"
|
|
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=1a6f8d514fc11d2571c75c207d932c106f024f199b5f12d25f8ca022b026c59d
|
|
|
|
pre_build() {
|
|
cp -a ${wrksrc} /tmp/pbr-2.7
|
|
cp -a ${wrksrc} /tmp/pbr-3.4
|
|
mv /tmp/pbr-{2.7,3.4} ${wrksrc}
|
|
|
|
cd pbr-3.4
|
|
sed -i '/console_scripts =/{n;s,pbr =,pbr3 =,}' setup.cfg
|
|
}
|
|
do_build() {
|
|
for pyver in $python_versions; do
|
|
cd ${wrksrc}/pbr-${pyver}
|
|
python${pyver} setup.py build
|
|
done
|
|
}
|
|
do_install() {
|
|
for pyver in $python_versions; do
|
|
cd ${wrksrc}/pbr-${pyver}
|
|
python${pyver} setup.py install --root=${DESTDIR}
|
|
done
|
|
}
|
|
|
|
python3.4-pbr_package() {
|
|
noarch=yes
|
|
depends="python3.4"
|
|
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
|
|
}
|
|
}
|