2f832ef
%define run_tests 1
178ba02
178ba02
Name:           python-rdflib
6015524
Version:        3.2.0
2f832ef
Release:        4%{?dist}
178ba02
Summary:        Python library for working with RDF
178ba02
178ba02
Group:          Development/Languages
178ba02
License:        BSD
6015524
URL:            http://code.google.com/p/rdflib/
48dfb5c
Source0:        http://rdflib.googlecode.com/files/rdflib-%{version}.tar.gz
2f832ef
Patch0:         0001-Skip-test-if-it-can-not-join-the-network.patch
bb63a7d
BuildArch:      noarch
178ba02
178ba02
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
7584bd6
Requires:       python-isodate
178ba02
2f832ef
BuildRequires:  python-isodate
178ba02
BuildRequires:  python-devel
178ba02
%if 0%{?fedora} >= 8
178ba02
BuildRequires: python-setuptools-devel
178ba02
%else
178ba02
BuildRequires: python-setuptools
178ba02
%endif
178ba02
178ba02
%if %{run_tests}
178ba02
BuildRequires:  python-nose >= 0.9.2
178ba02
%endif
178ba02
178ba02
%description
178ba02
RDFLib is a Python library for working with RDF, a simple yet powerful
178ba02
language for representing information.
178ba02
178ba02
The library contains parsers and serializers for RDF/XML, N3, NTriples,
178ba02
Turtle, TriX and RDFa. The library presents a Graph interface which can
178ba02
be backed by any one of a number of store implementations, including
178ba02
memory, MySQL, Redland, SQLite, Sleepycat, ZODB and SQLObject.
178ba02
178ba02
%prep
48dfb5c
%setup -q -n rdflib-%{version}
178ba02
2f832ef
%patch0 -p0 -b .test
2f832ef
178ba02
%build
bb63a7d
%{__python} setup.py build
178ba02
178ba02
%install
178ba02
rm -rf $RPM_BUILD_ROOT
178ba02
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
bb63a7d
cp LICENSE $RPM_BUILD_ROOT/%{python_sitelib}/rdflib/LICENSE
178ba02
178ba02
# Various .py files within site-packages have a shebang line but aren't
178ba02
# flagged as executable.
178ba02
# I've gone through them and either removed the shebang or made them
178ba02
# executable as appropriate:
178ba02
bb63a7d
# __main__ parses URI as N-Triples:
bb63a7d
chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/rdflib/plugins/parsers/ntriples.py
178ba02
bb63a7d
# __main__ parses the file given on the command line:
bb63a7d
chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/rdflib/plugins/parsers/notation3.py
178ba02
178ba02
178ba02
%check
178ba02
%if %{run_tests}
2f832ef
sed -i -e "s|'--with-doctest'|#'--with-doctest'|" run_tests.py
bb63a7d
%{__python} run_tests.py
178ba02
%endif
178ba02
178ba02
%clean
178ba02
rm -rf $RPM_BUILD_ROOT
178ba02
178ba02
%files
178ba02
%defattr(-,root,root,-)
178ba02
%doc LICENSE
bb63a7d
%{python_sitelib}/*
178ba02
178ba02
%changelog
2f832ef
* Tue Jan 24 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.0-4
2f832ef
- Re-add the unittests, for that, patch one and disable the run of
2f832ef
the tests in the documentation of the code.
2f832ef
7584bd6
* Mon Jan 23 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.0-3
7584bd6
- Add python-isodate as R (RHBZ#784027)
7584bd6
bc737c7
* Fri Jan 20 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.0-2
bc737c7
- Found the official sources of the 3.2.0 release
bc737c7
6015524
* Fri Jan 20 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.0-1
6015524
- Update to 3.2.0-RC which seem to be same as 3.2.0
6015524
ecca0c2
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-2
ecca0c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ecca0c2
bb63a7d
* Wed Sep 28 2011 David Malcolm <dmalcolm@redhat.com> - 3.1.0-1
bb63a7d
- 3.1.0; converting from arch-specific to noarch (sitearch -> sitelib);
bb63a7d
removing rdfpipe and various other extensions
bb63a7d
32e8519
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-3
32e8519
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
32e8519
a099d76
* Thu Jul 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 2.4.2-2
a099d76
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a099d76
74c3f53
* Wed Jan  6 2010 David Malcolm <dmalcolm@redhat.com> - 2.4.2-1
74c3f53
- bump to 2.4.2 (#552909)
74c3f53
- fix source URL to use version macro
74c3f53
bbb5a59
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-10
bbb5a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
bbb5a59
2e1cd47
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-9
2e1cd47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2e1cd47
3fff280
* Wed Dec 10 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.4.0-8
3fff280
- Rebuild for Python 2.6
3fff280
178ba02
* Wed Oct  1 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-7
178ba02
- fix tab/space issue in specfile
178ba02
178ba02
* Tue Sep 30 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-6
178ba02
- override autogeneration of provides info to eliminate unwanted provision
178ba02
of SPARQLParserc.so
178ba02
178ba02
* Mon Sep 29 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-5
178ba02
- make various scripts executable, or remove shebang, as appropriate
178ba02
178ba02
* Tue Feb 19 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-4
178ba02
- delete test subdir
178ba02
178ba02
* Thu Jan 24 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-3
178ba02
- introduce macro to disable running the test suite, in the hope of eventually
178ba02
patching it so it passes
178ba02
178ba02
* Mon Nov 19 2007 David Malcolm <dmalcolm@redhat.com> - 2.4.0-2
178ba02
- add python-setuptools(-devel) build requirement; move testing to correct stanza
178ba02
178ba02
* Wed Aug  1 2007 David Malcolm <dmalcolm@redhat.com> - 2.4.0-1
178ba02
- initial version
178ba02