Blame SPECS/python-rdflib.spec

cd3329
%global pypi_name rdflib
cd3329
cd3329
%global run_tests 1
cd3329
cd3329
Name:           python-%{pypi_name}
cd3329
Version:        5.0.0
cd3329
Release:        1%{?dist}
cd3329
Summary:        Python library for working with RDF
cd3329
cd3329
License:        BSD
cd3329
URL:            https://github.com/RDFLib/rdflib
cd3329
Source0:        https://files.pythonhosted.org/packages/source/r/rdflib/rdflib-%{version}.tar.gz
cd3329
BuildArch:      noarch
cd3329
cd3329
BuildRequires:  python3-html5lib >= 1:
cd3329
BuildRequires:  python3-isodate
cd3329
BuildRequires:  python3-pyparsing
cd3329
BuildRequires:  python3-devel
cd3329
BuildRequires:  python3-setuptools
cd3329
cd3329
%if %{run_tests}
cd3329
BuildRequires:  python3-nose >= 0.9.2
cd3329
%endif
cd3329
cd3329
%description
cd3329
RDFLib is a Python library for working with RDF, a simple yet powerful
cd3329
language for representing information.
cd3329
cd3329
The library contains parsers and serializers for RDF/XML, N3,
cd3329
NTriples, Turtle, TriX, RDFa and Microdata. The library presents
cd3329
a Graph interface which can be backed by any one of a number of
cd3329
Store implementations. The core rdflib includes store
cd3329
implementations for in memory storage, persistent storage on top
cd3329
of the Berkeley DB, and a wrapper for remote SPARQL endpoints.
cd3329
cd3329
cd3329
%package -n python3-%{pypi_name}
cd3329
Summary:        %{summary}
cd3329
%{?python_provide:%python_provide python3-%{pypi_name}}
cd3329
Requires:       python3-html5lib >= 1:
cd3329
Requires:       python3-isodate
cd3329
Requires:       python3-pyparsing
cd3329
# Unversioned binaries (/usr/bin/csv2rdf etc) moved
cd3329
# from python2-rdflib to python3-rdflib in 4.2.1-11.
cd3329
Conflicts:      python2-rdflib <= 4.2.1-10
cd3329
cd3329
%description -n python3-%{pypi_name}
cd3329
RDFLib is a Python library for working with RDF, a simple yet powerful
cd3329
language for representing information.
cd3329
cd3329
The library contains parsers and serializers for RDF/XML, N3,
cd3329
NTriples, Turtle, TriX, RDFa and Microdata. The library presents
cd3329
a Graph interface which can be backed by any one of a number of
cd3329
Store implementations. The core rdflib includes store
cd3329
implementations for in memory storage, persistent storage on top
cd3329
of the Berkeley DB, and a wrapper for remote SPARQL endpoints.
cd3329
cd3329
This is for Python 3.
cd3329
cd3329
%prep
cd3329
%setup -q -n rdflib-%{version}
cd3329
cd3329
# remove bundled egg-info
cd3329
rm -rf %{pypi_name}.egg-info
cd3329
cd3329
find -name "*.pyc" -delete
cd3329
cd3329
sed -i -e 's|_sn_gen=bnode_uuid()|_sn_gen=bnode_uuid|' test/test_bnode_ncname.py
cd3329
cd3329
cd3329
%build
cd3329
%py3_build
cd3329
cd3329
cd3329
%install
cd3329
%py3_install
cd3329
cd3329
# rename binaries
cd3329
for i in csv2rdf rdf2dot rdfgraphisomorphism rdfpipe rdfs2dot; do
cd3329
    mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}
cd3329
    ln -s $i-%{python3_version} %{buildroot}%{_bindir}/$i
cd3329
    ln -s $i-%{python3_version} %{buildroot}%{_bindir}/$i-3
cd3329
done
cd3329
cd3329
cp LICENSE %{buildroot}%{python3_sitelib}/rdflib/LICENSE
cd3329
cd3329
# Various .py files within site-packages have a shebang line but aren't
cd3329
# flagged as executable.
cd3329
# I've gone through them and either removed the shebang or made them
cd3329
# executable as appropriate:
cd3329
cd3329
# __main__ parses URI as N-Triples:
cd3329
chmod +x %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/ntriples.py
cd3329
cd3329
# __main__ parses the file given on the command line:
cd3329
chmod +x %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/notation3.py
cd3329
cd3329
# __main__ parses the file or URI given on the command line:
cd3329
chmod +x %{buildroot}%{python3_sitelib}/rdflib/tools/rdfpipe.py
cd3329
cd3329
# __main__ runs a test (well, it's something)
cd3329
chmod +x %{buildroot}%{python3_sitelib}/rdflib/extras/infixowl.py \
cd3329
         %{buildroot}%{python3_sitelib}/rdflib/extras/external_graph_libs.py
cd3329
cd3329
# sed these headers out as they include no __main__
cd3329
for lib in %{buildroot}%{python3_sitelib}/rdflib/extras/describer.py \
cd3329
    %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/pyRdfa/extras/httpheader.py; do
cd3329
 sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
cd3329
 touch -r $lib $lib.new &&
cd3329
 mv $lib.new $lib
cd3329
done
cd3329
cd3329
# sed shebangs
cd3329
sed -i '1s=^#!/usr/bin/\(python\|env python\).*=#!%{__python3}='  \
cd3329
    %{buildroot}%{python3_sitelib}/rdflib/extras/infixowl.py \
cd3329
    %{buildroot}%{python3_sitelib}/rdflib/extras/external_graph_libs.py \
cd3329
    %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/ntriples.py \
cd3329
    %{buildroot}%{python3_sitelib}/rdflib/tools/rdfpipe.py \
cd3329
    %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/notation3.py
cd3329
cd3329
%check
cd3329
%if %{run_tests}
cd3329
sed -i -e "s|'--with-doctest'|#'--with-doctest'|" run_tests.py
cd3329
sed -i -e "s|'--doctest-tests'|#'--doctest-tests'|" run_tests.py
cd3329
sed -i -e "s|with-doctest = 1|#with-doctest = 1|" setup.cfg
cd3329
cd3329
# The python 3 tests are failing, but better to have them here anyway
cd3329
# TODO investigate the failures
cd3329
%{__python3} run_tests.py --verbose || :
cd3329
%endif
cd3329
cd3329
cd3329
%files -n python3-%{pypi_name}
cd3329
%license LICENSE
cd3329
%doc README.md
cd3329
%{python3_sitelib}/%{pypi_name}
cd3329
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
cd3329
%{_bindir}/csv2rdf
cd3329
%{_bindir}/csv2rdf-3*
cd3329
%{_bindir}/rdf2dot
cd3329
%{_bindir}/rdf2dot-3*
cd3329
%{_bindir}/rdfgraphisomorphism
cd3329
%{_bindir}/rdfgraphisomorphism-3*
cd3329
%{_bindir}/rdfpipe
cd3329
%{_bindir}/rdfpipe-3*
cd3329
%{_bindir}/rdfs2dot
cd3329
%{_bindir}/rdfs2dot-3*
cd3329
cd3329
%changelog
cd3329
* Mon Feb 15 2021 Dan Callaghan <djc@djc.id.au> - 5.0.0-1
cd3329
- New upstream release 5.0.0:
cd3329
  https://github.com/RDFLib/rdflib/blob/5.0.0/CHANGELOG.md
cd3329
cd3329
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-17
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
cd3329
cd3329
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-16
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
cd3329
cd3329
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 4.2.1-15
cd3329
- Rebuilt for Python 3.9
cd3329
cd3329
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-14
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
cd3329
cd3329
* Mon Sep 16 2019 Miro Hrončok <mhroncok@redhat.com> - 4.2.1-13
cd3329
- Subpackage python2-rdflib has been removed
cd3329
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
cd3329
cd3329
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 4.2.1-12
cd3329
- Rebuilt for Python 3.8
cd3329
cd3329
* Wed Aug 14 2019 Dan Callaghan <djc@djc.id.au> - 4.2.1-11
cd3329
- Commands without suffix (/usr/bin/csv2rdf etc) are now the Python 3 version
cd3329
  as per https://fedoraproject.org/wiki/Changes/Python_means_Python3
cd3329
- Dropped Python 2 version of commands in preparation for Python 2 removal
cd3329
cd3329
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-10
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
cd3329
cd3329
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-9
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
cd3329
cd3329
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-8
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
cd3329
cd3329
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 4.2.1-7
cd3329
- Rebuilt for Python 3.7
cd3329
cd3329
* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.2.1-6
cd3329
- Update Python 2 dependency declarations to new packaging standards
cd3329
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
cd3329
cd3329
* Tue Feb 20 2018 Than Ngo <than@redhat.com> - 4.2.1-5
cd3329
- skip test_issue375 for python2, need to investigate later
cd3329
cd3329
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-4
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
cd3329
cd3329
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-3
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cd3329
cd3329
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-2
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
cd3329
cd3329
* Tue Jan 03 2017 Miro Hrončok <mhroncok@redhat.com> - 4.2.1-1
cd3329
- Update to 4.2.1
cd3329
- Add missing python3 requires (rhbz#1295098)
cd3329
- Modernize the package (python2 subpackage, %%pyX_* macros..., new versioned executable)
cd3329
- Run tests on Python 3, even when failing
cd3329
- Fixed bad shebangs
cd3329
cd3329
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 4.1.2-8
cd3329
- Rebuild for Python 3.6
cd3329
cd3329
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.2-7
cd3329
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
cd3329
cd3329
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.2-6
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
cd3329
cd3329
* Tue Nov 03 2015 Robert Kuska <rkuska@redhat.com> - 4.1.2-5
cd3329
- Rebuilt for Python3.5 rebuild
cd3329
cd3329
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.2-4
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
cd3329
cd3329
* Mon Jan 05 2015 Matthias Runge <mrunge@redhat.com> - 4.1.2-3
cd3329
- add python3 subpackage (rhbz#1086844)
cd3329
cd3329
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.2-2
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
cd3329
cd3329
* Fri Apr 18 2014 Dan Scott <dan@coffeecode.net> - 4.1.2-1
cd3329
- Update for 4.1.2 release
cd3329
- Add PYTHONPATH awareness for running tests
cd3329
cd3329
* Tue Mar 04 2014 Dan Scott <dan@coffeecode.net> - 4.1.1-1
cd3329
- Update for 4.1.1 release
cd3329
- Support for RDF 1.1 and HTML5
cd3329
- Support for RDFa, TRiG, microdata parsers, and HTML structured data
cd3329
- Patch to make SPARQLWrapper an extras_require until it is packaged
cd3329
cd3329
* Thu Dec 12 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2.3-6
cd3329
- Remove BR of python-setuptools-devel
cd3329
cd3329
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-5
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
cd3329
cd3329
* Wed Mar 27 2013 David Malcolm <dmalcolm@redhat.com> - 3.2.3-4
cd3329
- disable doctests (rhbz#914414)
cd3329
cd3329
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-3
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
cd3329
cd3329
* Wed Oct 10 2012  Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.3-2
cd3329
- Re-enable tests
cd3329
- Backport using sed unit-tests fix from upstream
cd3329
   (commit 26d25faa90483ed1ba7675d159d10e955dbaf442)
cd3329
cd3329
* Wed Oct 10 2012  Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.3-1
cd3329
- Update to 3.2.3
cd3329
- One test is failing, so disabling them for now
cd3329
cd3329
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-5
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
cd3329
cd3329
* Tue Jan 24 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.0-4
cd3329
- Re-add the unittests, for that, patch one and disable the run of
cd3329
the tests in the documentation of the code.
cd3329
cd3329
* Mon Jan 23 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.0-3
cd3329
- Add python-isodate as R (RHBZ#784027)
cd3329
cd3329
* Fri Jan 20 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.0-2
cd3329
- Found the official sources of the 3.2.0 release
cd3329
cd3329
* Fri Jan 20 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.2.0-1
cd3329
- Update to 3.2.0-RC which seem to be same as 3.2.0
cd3329
cd3329
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-2
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
cd3329
cd3329
* Wed Sep 28 2011 David Malcolm <dmalcolm@redhat.com> - 3.1.0-1
cd3329
- 3.1.0; converting from arch-specific to noarch (sitearch -> sitelib);
cd3329
removing rdfpipe and various other extensions
cd3329
cd3329
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-3
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
cd3329
cd3329
* Thu Jul 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 2.4.2-2
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
cd3329
cd3329
* Wed Jan  6 2010 David Malcolm <dmalcolm@redhat.com> - 2.4.2-1
cd3329
- bump to 2.4.2 (#552909)
cd3329
- fix source URL to use version macro
cd3329
cd3329
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-10
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
cd3329
cd3329
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-9
cd3329
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
cd3329
cd3329
* Wed Dec 10 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.4.0-8
cd3329
- Rebuild for Python 2.6
cd3329
cd3329
* Wed Oct  1 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-7
cd3329
- fix tab/space issue in specfile
cd3329
cd3329
* Tue Sep 30 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-6
cd3329
- override autogeneration of provides info to eliminate unwanted provision
cd3329
of SPARQLParserc.so
cd3329
cd3329
* Mon Sep 29 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-5
cd3329
- make various scripts executable, or remove shebang, as appropriate
cd3329
cd3329
* Tue Feb 19 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-4
cd3329
- delete test subdir
cd3329
cd3329
* Thu Jan 24 2008 David Malcolm <dmalcolm@redhat.com> - 2.4.0-3
cd3329
- introduce macro to disable running the test suite, in the hope of eventually
cd3329
patching it so it passes
cd3329
cd3329
* Mon Nov 19 2007 David Malcolm <dmalcolm@redhat.com> - 2.4.0-2
cd3329
- add python-setuptools(-devel) build requirement; move testing to correct stanza
cd3329
cd3329
* Wed Aug  1 2007 David Malcolm <dmalcolm@redhat.com> - 2.4.0-1
cd3329
- initial version
cd3329