178ba02
# The upstream test suite does not pass on recent versions of Fedora
178ba02
# See package review (bug 378841)
178ba02
# For now, we disable running the test suite:
178ba02
%define run_tests 0
178ba02
178ba02
Name:           python-rdflib
bb63a7d
Version:        3.1.0
bb63a7d
Release:        1%{?dist}
178ba02
Summary:        Python library for working with RDF
178ba02
178ba02
Group:          Development/Languages
178ba02
License:        BSD
178ba02
URL:            http://rdflib.net
bb63a7d
Source0:        http://rdflib.googlecode.com/files/rdflib-%{version}.tar.gz
bb63a7d
BuildArch:      noarch
178ba02
178ba02
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
178ba02
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
178ba02
%setup -q -n rdflib-%{version}
178ba02
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}
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
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