Blame SPECS/python-rdflib.spec

347538
%global srcname rdflib
347538
347538
%bcond docs 0
347538
%bcond tests 0
347538
%if 0%{?fedora}
347538
%bcond docs 1
347538
%bcond tests 1
347538
%endif
347538
347538
Name:           python-%{srcname}
347538
Version:        7.1.3
347538
Release:        1%{?dist}
347538
Summary:        Python library for working with RDF
347538
License:        BSD-3-Clause
347538
URL:            https://github.com/RDFLib/rdflib
347538
BuildArch:      noarch
347538
347538
Source:         %{pypi_source}
347538
347538
BuildRequires:  python%{python3_pkgversion}-devel
347538
%if %{with tests}
347538
BuildRequires:  python3dist(pytest)
347538
%endif
347538
%if %{with docs}
347538
BuildRequires:  python3dist(myst-parser)
347538
BuildRequires:  python3dist(sphinx)
347538
BuildRequires:  python3dist(sphinx-autodoc-typehints)
347538
BuildRequires:  python3dist(sphinxcontrib-apidoc)
347538
BuildRequires:  python3dist(typing-extensions)
347538
%endif
347538
347538
%description
347538
RDFLib is a pure Python package for working with RDF. RDFLib contains most
347538
things you need to work with RDF, including parsers and serializers for
347538
RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, Trig and JSON-LD, a Graph
347538
interface which can be backed by any one of a number of Store implementations,
347538
store implementations for in-memory, persistent on disk (Berkeley DB) and
347538
remote SPARQL endpoints, a SPARQL 1.1 implementation - supporting SPARQL 1.1
347538
Queries and Update statements - and SPARQL function extension mechanisms.
347538
347538
%package -n python%{python3_pkgversion}-%{srcname}
347538
Summary:        %{summary}
347538
347538
%description -n python%{python3_pkgversion}-%{srcname}
347538
RDFLib is a pure Python package for working with RDF. RDFLib contains most
347538
things you need to work with RDF, including parsers and serializers for
347538
RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, Trig and JSON-LD, a Graph
347538
interface which can be backed by any one of a number of Store implementations,
347538
store implementations for in-memory, persistent on disk (Berkeley DB) and
347538
remote SPARQL endpoints, a SPARQL 1.1 implementation - supporting SPARQL 1.1
347538
Queries and Update statements - and SPARQL function extension mechanisms.
347538
347538
%if %{with docs}
347538
%package -n python%{python3_pkgversion}-%{srcname}-docs
347538
Summary:        Documentation for %{srcname}
347538
347538
%description -n python%{python3_pkgversion}-%{srcname}-docs
347538
Documentation for %{srcname}, a Python library for working with RDF.
347538
%endif
347538
347538
%prep
347538
%autosetup -p1 -n %{srcname}-%{version}
347538
347538
%generate_buildrequires
347538
%pyproject_buildrequires
347538
347538
%build
347538
%pyproject_wheel
347538
347538
%install
347538
%pyproject_install
347538
347538
# Various .py files within site-packages have a shebang line but aren't
347538
# flagged as executable.
347538
# I've gone through them and either removed the shebang or made them
347538
# executable as appropriate:
347538
347538
# __main__ parses URI as N-Triples:
347538
chmod +x %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/ntriples.py
347538
347538
# __main__ parses the file or URI given on the command line:
347538
chmod +x %{buildroot}%{python3_sitelib}/rdflib/tools/rdfpipe.py
347538
347538
# __main__ runs a test (well, it's something)
347538
chmod +x %{buildroot}%{python3_sitelib}/rdflib/extras/external_graph_libs.py
347538
347538
# sed these headers out as they include no __main__
347538
for lib in %{buildroot}%{python3_sitelib}/rdflib/extras/describer.py; do
347538
 sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
347538
 touch -r $lib $lib.new &&
347538
 mv $lib.new $lib
347538
done
347538
347538
# sed shebangs
347538
sed -i '1s=^#!/usr/bin/\(python\|env python\).*=#!%{__python3}='  \
347538
    %{buildroot}%{python3_sitelib}/rdflib/extras/infixowl.py \
347538
    %{buildroot}%{python3_sitelib}/rdflib/extras/external_graph_libs.py \
347538
    %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/ntriples.py \
347538
    %{buildroot}%{python3_sitelib}/rdflib/tools/rdfpipe.py \
347538
    %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/notation3.py
347538
347538
%if %{with docs}
347538
# generate html docs
347538
PYTHONPATH=%{buildroot}%{python3_sitelib} sphinx-build-3 -b html -d docs/_build/doctree docs docs/_build/html
347538
# remove the sphinx-build-3 leftovers
347538
rm -rf docs/_build/html/.{doctrees,buildinfo}
347538
%endif
347538
347538
%pyproject_save_files -L %{srcname}
347538
347538
%if %{with tests}
347538
%check
347538
%pytest -k "not rdflib and not rdflib.extras.infixowl and not \
347538
            test_example and not test_suite and not \
347538
            test_infix_owl_example1 and not test_context and not \
347538
            test_service and not test_simple_not_null and not \
347538
            test_sparqleval and not test_parser \
347538
%if "%{version}" == "7.0.0" && (! 0%{?fedora} || 0%{?fedora} >= 42)
347538
            and not test_literal_addsub[2006-07-01T20:52:00-P123D-aplusb-2006-11-01T12:50:00] \
347538
            and not test_literal_addsub[2006-07-01T20:52:00-2006-11-01T12:50:00-bminusa-P123D] \
347538
%endif
347538
            " -m "not webtest"
347538
%endif
347538
347538
%files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files}
347538
%license LICENSE
347538
%doc README.md
347538
%{_bindir}/csv2rdf
347538
%{_bindir}/rdf2dot
347538
%{_bindir}/rdfgraphisomorphism
347538
%{_bindir}/rdfpipe
347538
%{_bindir}/rdfs2dot
347538
347538
%if %{with docs}
347538
%files -n python%{python3_pkgversion}-%{srcname}-docs
347538
%license LICENSE
347538
%doc docs/_build/html
347538
%endif
347538
347538
%changelog
347538
* Wed Jan 29 2025 Nils Philippsen <nils@tiptoe.de> - 7.1.3-1
347538
- Update to 7.1.3
347538
347538
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-8
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
347538
347538
* Wed Oct 09 2024 Nils Philippsen <nils@tiptoe.de> - 7.0.0-7
347538
- Skip tests failing with isodate 0.7 on F42+
347538
347538
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-5
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
347538
347538
* Tue Jul 02 2024 Nils Philippsen <nils@tiptoe.de> - 7.0.0-4
347538
- Fix testing with pytest 8
347538
347538
* Thu Jun 13 2024 Michel Lind <salimma@fedoraproject.org> - 7.0.0-3
347538
- Work around inability to override Pickler/Unpickler methods in Python
347538
  3.13
347538
347538
* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 7.0.0-2
347538
- Rebuilt for Python 3.13
347538
347538
* Sat May 25 2024 Robert-André Mauchin <zebob.m@gmail.com> - 7.0.0-1
347538
- Update to 7.0.0
347538
- Use current Python macros
347538
- Run tests
347538
- Build docs
347538
347538
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.0-6
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
347538
347538
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.0-5
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
347538
347538
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.0-4
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
347538
347538
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 6.2.0-3
347538
- Rebuilt for Python 3.12
347538
347538
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.0-2
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
347538
347538
* Tue Aug 30 2022 Simone Caronni <negativo17@gmail.com> - 6.2.0-1
347538
- Update to 6.2.0.
347538
- Update SPEC file.
347538
- Trim changelog.
347538
347538
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-7
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
347538
347538
* Tue Jul 19 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 5.0.0-6
347538
- Rebuilt for pyparsing-3.0.9
347538
347538
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 5.0.0-5
347538
- Rebuilt for Python 3.11
347538
347538
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-4
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
347538
347538
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-3
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
347538
347538
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 5.0.0-2
347538
- Rebuilt for Python 3.10
347538
347538
* Mon Feb 15 2021 Dan Callaghan <djc@djc.id.au> - 5.0.0-1
347538
- New upstream release 5.0.0:
347538
  https://github.com/RDFLib/rdflib/blob/5.0.0/CHANGELOG.md
347538
347538
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-17
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
347538
347538
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-16
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
347538
347538
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 4.2.1-15
347538
- Rebuilt for Python 3.9
347538
347538
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-14
347538
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild