void-packages/srcpkgs/python-rdflib/template
2014-11-11 22:54:46 +01:00

64 lines
1.6 KiB
Text

# Template file for 'python-rdflib'
pkgname=python-rdflib
version=4.1.2
revision=2
noarch=yes
wrksrc="rdflib-${version}"
python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools"
depends="python-isodate python-parsing"
pycompile_module="rdflib"
short_desc="Python2 library for working with RDF"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="https://github.com/RDFLib/rdflib"
license="BSD"
distfiles="${PYPI_SITE}/r/rdflib/rdflib-${version}.tar.gz"
checksum=3cf94bda0867f21468b248ce9f671581efb92ae9edd28ff321716126c6706a4f
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 -e 's,csv2rdf =,csv2rdf3 =,' \
-e 's,rdf2dot =,rdf2dot3 =,' \
-e 's,rdfgraphisomorphism =,rdfgraphisomorphism3 =,' \
-e 's,rdfpipe =,rdfpipe3 =,' \
-e 's,rdfs2dot =,rdfs2dot3 =,' setup.py
find . -name '*.py' -exec sed -i -e 's,#!/usr/bin/env python,&3.4,' {} +
}
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-rdflib_package() {
noarch=yes
depends="python3.4-isodate python3.4-parsing"
pycompile_version="3.4"
pycompile_module="rdflib"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/bin/csv2rdf3
vmove usr/bin/rdf2dot3
vmove usr/bin/rdfgraphisomorphism3
vmove usr/bin/rdfpipe3
vmove usr/bin/rdfs2dot3
vmove usr/lib/python3.4
}
}