Update for RDFLib 4.1.1

Adds RDF 1.1 feature support, RDFa, Microdata, and TriG parsers, HTML5
handling.

The tools originally provided by python-rdfextras are now provided as part of
python-rdflib itself, so we add an Obsoletes line accordingly.

We also make SPARQLWrapper an "extras_require" for 4.1; per upstream discussion,
SPARQLWrapper can be an optional dependency for 4.1 but will be made mandatory
for 4.2. This gives us time to ensure SPARQLWrapper is packaged while providing
all of the rest of the bug fixes and additional functionality in RDFLib 4.1.

Signed-off-by: Dan Scott <dan@coffeecode.net>
epel9
Dan Scott 11 years ago
parent d0db4c0fd7
commit 499cd94260

@ -0,0 +1,40 @@
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 for now
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 a/setup.py b/setup.py
index c00a978..380d449 100644
--- a/setup.py
+++ b/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')
--
1.8.5.3

@ -1,20 +1,24 @@
%define run_tests 1 %define run_tests 1
Name: python-rdflib Name: python-rdflib
Version: 3.2.3 Version: 4.1.1
Release: 6%{?dist} Release: 1%{?dist}
Summary: Python library for working with RDF Summary: Python library for working with RDF
Group: Development/Languages Group: Development/Languages
License: BSD License: BSD
URL: http://code.google.com/p/rdflib/ URL: https://github.com/RDFLib/rdflib
Source0: http://pypi.python.org/packages/source/r/rdflib/rdflib-%{version}.tar.gz Source0: http://pypi.python.org/packages/source/r/rdflib/rdflib-%{version}.tar.gz
Patch1: python-rdflib-SPARQLWrapper-optional.patch
BuildArch: noarch BuildArch: noarch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires: python-isodate Requires: python-isodate
Requires: pyparsing
BuildRequires: python-html5lib
BuildRequires: python-isodate BuildRequires: python-isodate
BuildRequires: pyparsing
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
@ -22,17 +26,24 @@ BuildRequires: python-setuptools
BuildRequires: python-nose >= 0.9.2 BuildRequires: python-nose >= 0.9.2
%endif %endif
Obsoletes: python-rdfextras <= 0.1-7
%description %description
RDFLib is a Python library for working with RDF, a simple yet powerful RDFLib is a Python library for working with RDF, a simple yet powerful
language for representing information. language for representing information.
The library contains parsers and serializers for RDF/XML, N3, NTriples, The library contains parsers and serializers for RDF/XML, N3,
Turtle, TriX and RDFa. The library presents a Graph interface which can NTriples, Turtle, TriX, RDFa and Microdata. The library presents
be backed by any one of a number of store implementations, including a Graph interface which can be backed by any one of a number of
memory, MySQL, Redland, SQLite, Sleepycat, ZODB and SQLObject. Store implementations. The core rdflib includes store
implementations for in memory storage, persistent storage on top
of the Berkeley DB, and a wrapper for remote SPARQL endpoints.
A SPARQL 1.1 engine is also included.
%prep %prep
%setup -q -n rdflib-%{version} %setup -q -n rdflib-%{version}
%patch1 -p1
find -name "*.pyc" -delete find -name "*.pyc" -delete
sed -i -e 's|_sn_gen=bnode_uuid()|_sn_gen=bnode_uuid|' test/test_bnode_ncname.py sed -i -e 's|_sn_gen=bnode_uuid()|_sn_gen=bnode_uuid|' test/test_bnode_ncname.py
@ -57,6 +68,20 @@ chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/rdflib/plugins/parsers/ntriples.py
# __main__ parses the file given on the command line: # __main__ parses the file given on the command line:
chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/rdflib/plugins/parsers/notation3.py chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/rdflib/plugins/parsers/notation3.py
# __main__ parses the file or URI given on the command line:
chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/rdflib/tools/rdfpipe.py
# __main__ runs a test (well, it's something)
chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/rdflib/extras/infixowl.py
# sed these headers out as they include no __main__
for lib in $RPM_BUILD_ROOT/%{python_sitelib}/rdflib/extras/describer.py \
$RPM_BUILD_ROOT/%{python_sitelib}/rdflib/plugins/parsers/pyRdfa/extras/httpheader.py \
$RPM_BUILD_ROOT/%{python_sitelib}/rdflib/plugins/parsers/structureddata.py; do
sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
touch -r $lib $lib.new &&
mv $lib.new $lib
done
%check %check
%if %{run_tests} %if %{run_tests}
@ -66,15 +91,19 @@ sed -i -e "s|with-doctest = 1|#with-doctest = 1|" setup.cfg
%{__python} run_tests.py --verbose %{__python} run_tests.py --verbose
%endif %endif
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE %doc LICENSE
%{python_sitelib}/* %{python_sitelib}/*
%{_bindir}/*
%changelog %changelog
* Tue Mar 04 2014 Dan Scott <dan@coffeecode.net> - 4.1.1-1
- Update for 4.1.1 release
- Support for RDF 1.1 and HTML5
- Support for RDFa, TRiG, microdata parsers, and HTML structured data
- Patch to make SPARQLWrapper an extras_require until it is packaged
* Thu Dec 12 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2.3-6 * Thu Dec 12 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2.3-6
- Remove BR of python-setuptools-devel - Remove BR of python-setuptools-devel

Loading…
Cancel
Save