python-rdflib: update to 4.2.0

This commit is contained in:
Alessio Sergi 2015-03-01 21:20:00 +01:00
parent 2b85bf5e97
commit 428c8a7cc7
2 changed files with 60 additions and 35 deletions

View file

@ -0,0 +1,37 @@
From 7b69cb5f2fe46d46814712cdc43123807c681dc3 Mon Sep 17 00:00:00 2001
From: Dan Scott <dan@coffeecode.net>
Date: Sun, 2 Mar 2014 19:55:08 -0500
Subject: [PATCH] Make SPARQLWrapper an extra_requires
Per discussion in https://github.com/RDFLib/rdflib/pull/359
Signed-off-by: Dan Scott <dan@coffeecode.net>
---
setup.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git setup.py setup.py
index c00a978..380d449 100644
--- setup.py
+++ setup.py
@@ -41,8 +41,8 @@ if sys.version_info[0] >= 3:
kwargs['install_requires'] = ['isodate', 'pyparsing']
kwargs['tests_require'] = ['html5lib']
kwargs['requires'] = [
- 'isodate', 'pyparsing',
- 'SPARQLWrapper']
+ 'isodate', 'pyparsing']
+ kwargs['extras_require'] = {'SPARQLStore': 'SPARQLWrapper'}
kwargs['src_root'] = setup_python3()
assert setup
else:
@@ -52,7 +52,8 @@ else:
kwargs['test_suite'] = "nose.collector"
kwargs['install_requires'] = [
'isodate',
- 'pyparsing', 'SPARQLWrapper']
+ 'pyparsing']
+ kwargs['extras_require'] = {'SPARQLStore': 'SPARQLWrapper'}
if sys.version_info[1]<7: # Python 2.6
kwargs['install_requires'].append('ordereddict')

View file

@ -1,64 +1,52 @@
# Template file for 'python-rdflib'
pkgname=python-rdflib
version=4.1.2
revision=2
version=4.2.0
revision=1
noarch=yes
wrksrc="rdflib-${version}"
python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools"
depends="python-isodate python-parsing"
depends="python-setuptools 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}
}
checksum=7420dafc4930249d0cfcf31e8547a39b658d079ab2c9e975465f6697a8476ec0
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,' {} +
}
cp -a ${wrksrc} /tmp/rdflib-2.7
cp -a ${wrksrc} /tmp/rdflib-3.4
mv /tmp/rdflib-{2.7,3.4} ${wrksrc}
cd ${wrksrc}/rdflib-3.4
for f in csv2rdf rdf{2dot,graphisomorphism,pipe,s2dot}; do
sed -i "s,\(${f}\) =,\13 =," setup.py
done
find . -type f -name '*.py' -exec sed -i '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
for pyver in $python_versions; do
cd ${wrksrc}/rdflib-${pyver}
python${pyver} setup.py build
done
}
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}
for pyver in $python_versions; do
cd ${wrksrc}/rdflib-${pyver}
python${pyver} setup.py install --root=${DESTDIR}
done
}
python3.4-rdflib_package() {
noarch=yes
depends="python3.4-isodate python3.4-parsing"
depends="python3.4-setuptools 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/bin/*3
vmove usr/lib/python3.4
}
}