%global srcname rdflib # Tests not compatible with pytest 5+: %global run_tests 0 Name: python-%{srcname} Version: 6.2.0 Release: 6%{?dist} Summary: Python library for working with RDF License: BSD-3-Clause URL: https://github.com/RDFLib/rdflib BuildArch: noarch Source0: %{pypi_source} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %{?python_enable_dependency_generator} %description RDFLib is a pure Python package for working with RDF. RDFLib contains most things you need to work with RDF, including parsers and serializers for RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, Trig and JSON-LD, a Graph interface which can be backed by any one of a number of Store implementations, store implementations for in-memory, persistent on disk (Berkeley DB) and remote SPARQL endpoints, a SPARQL 1.1 implementation - supporting SPARQL 1.1 Queries and Update statements - and SPARQL function extension mechanisms. %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} %description -n python%{python3_pkgversion}-%{srcname} RDFLib is a pure Python package for working with RDF. RDFLib contains most things you need to work with RDF, including parsers and serializers for RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, Trig and JSON-LD, a Graph interface which can be backed by any one of a number of Store implementations, store implementations for in-memory, persistent on disk (Berkeley DB) and remote SPARQL endpoints, a SPARQL 1.1 implementation - supporting SPARQL 1.1 Queries and Update statements - and SPARQL function extension mechanisms. %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %if %{run_tests} %pyproject_buildrequires -x tests %else %pyproject_buildrequires %endif %build %py3_build %install %py3_install # Various .py files within site-packages have a shebang line but aren't # flagged as executable. # I've gone through them and either removed the shebang or made them # executable as appropriate: # __main__ parses URI as N-Triples: chmod +x %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/ntriples.py # __main__ parses the file given on the command line: chmod +x %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/notation3.py # __main__ parses the file or URI given on the command line: chmod +x %{buildroot}%{python3_sitelib}/rdflib/tools/rdfpipe.py # __main__ runs a test (well, it's something) chmod +x %{buildroot}%{python3_sitelib}/rdflib/extras/infixowl.py \ %{buildroot}%{python3_sitelib}/rdflib/extras/external_graph_libs.py # sed these headers out as they include no __main__ for lib in %{buildroot}%{python3_sitelib}/rdflib/extras/describer.py \ %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/pyRdfa/extras/httpheader.py; do sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done # sed shebangs sed -i '1s=^#!/usr/bin/\(python\|env python\).*=#!%{__python3}=' \ %{buildroot}%{python3_sitelib}/rdflib/extras/infixowl.py \ %{buildroot}%{python3_sitelib}/rdflib/extras/external_graph_libs.py \ %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/ntriples.py \ %{buildroot}%{python3_sitelib}/rdflib/tools/rdfpipe.py \ %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/notation3.py %check %if %{run_tests} %{__python3} -m pytest %endif %files -n python3-%{srcname} %license LICENSE %doc CHANGELOG.md README.md %{python3_sitelib}/%{srcname} %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info %{_bindir}/csv2rdf %{_bindir}/rdf2dot %{_bindir}/rdfgraphisomorphism %{_bindir}/rdfpipe %{_bindir}/rdfs2dot %changelog * Fri Jan 26 2024 Fedora Release Engineering - 6.2.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 6.2.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 6.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 13 2023 Python Maint - 6.2.0-3 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 6.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Aug 30 2022 Simone Caronni - 6.2.0-1 - Update to 6.2.0. - Update SPEC file. - Trim changelog. * Fri Jul 22 2022 Fedora Release Engineering - 5.0.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jul 19 2022 Zbigniew Jędrzejewski-Szmek - 5.0.0-6 - Rebuilt for pyparsing-3.0.9 * Mon Jun 13 2022 Python Maint - 5.0.0-5 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 5.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 5.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Jun 03 2021 Python Maint - 5.0.0-2 - Rebuilt for Python 3.10 * Mon Feb 15 2021 Dan Callaghan - 5.0.0-1 - New upstream release 5.0.0: https://github.com/RDFLib/rdflib/blob/5.0.0/CHANGELOG.md * Wed Jan 27 2021 Fedora Release Engineering - 4.2.1-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 4.2.1-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sat May 23 2020 Miro Hrončok - 4.2.1-15 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 4.2.1-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild