python-jsonschema: use build_style=python-module

This commit is contained in:
Alessio Sergi 2016-04-01 10:48:59 +02:00
parent 1185bc6dff
commit e9d3e0c1d3

View file

@ -1,9 +1,10 @@
# Template file for 'python-jsonschema'
pkgname=python-jsonschema
version=2.5.1
revision=2
revision=3
noarch=yes
wrksrc="jsonschema-${version}"
build_style=python-module
python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools
python-vcversioner python3.4-vcversioner"
@ -16,25 +17,9 @@ license="MIT"
distfiles="${PYPI_SITE}/j/jsonschema/jsonschema-${version}.tar.gz"
checksum=36673ac378feed3daa5956276a829699056523d7961027911f064b52255ead41
pre_build() {
cp -a ${wrksrc} /tmp/jsonschema-2.7
cp -a ${wrksrc} /tmp/jsonschema-3.4
mv /tmp/jsonschema-{2.7,3.4} ${wrksrc}
cd jsonschema-3.4
sed -i 's,\(jsonschema\) =,\13 =,' setup.py
}
do_build() {
for pyver in $python_versions; do
cd ${wrksrc}/jsonschema-${pyver}
python${pyver} setup.py build
done
}
do_install() {
for pyver in $python_versions; do
cd ${wrksrc}/jsonschema-${pyver}
python${pyver} setup.py install --root=${DESTDIR}
done
post_install() {
cp -f ${DESTDIR}/usr/bin/jsonschema{,3.4}
replace_interpreter python ${DESTDIR}/usr/bin/jsonschema
vlicense COPYING LICENSE
}
@ -45,7 +30,7 @@ python3.4-jsonschema_package() {
pycompile_module="jsonschema"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/bin/jsonschema3
vmove usr/bin/jsonschema3.4
vmove usr/lib/python3.4
vlicense COPYING LICENSE
}