5e0cc5dda4
* BREAKING CHANGE: drop support for python 3.7 (#2436) * feat: add curie method to NamespaceManager (#2365) * feat: add optional target_graph argument to Graph.cbd and use it for DESCRIBE queries (#2322) * feat: Don't generate prefixes for unknown URIs (#2467) * feat: Longturtle improvements (#2500) * fix: SPARQL count with optionals (#2448) * fix: GROUP_CONCAT handling of empty separator (issue) (#2474) * fix: add NORMALIZE_LITERALS to rdflib.__all__ (#2489) * fix: correct imports and __all__ (#2340) * fix: dbpedia URL to use https instead of http (#2444) * fix: eliminate bare except: (#2350) * fix: eliminate some mutable default arguments in SPARQL code (#2301) * fix: formatting of SequencePath and AlternativePath (#2504) * fix: handling of rdf:HTML literals (#2490) * fix: HTTP 308 Permanent Redirect status code handling (#2389) * fix: lexical-to-value mapping of rdf:HTML literals (#2483) * fix: TriG handling of GRAPH keyword without a graph ID (#2469) * fix: TriG parser error handling for nested graphs (#2468) - Switch to autosetup and pyproject macros. - Shift docs build to the install phase, the module needs to be queryable. - Drop patch reproducible.patch, included. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rdflib?expand=0&rev=63
132 lines
4.2 KiB
RPMSpec
132 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package python-rdflib
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
# Tests don't work and cause a dependency loop with python-SPARQLWrapper
|
|
%bcond_with tests
|
|
Name: python-rdflib
|
|
Version: 7.0.0
|
|
Release: 0
|
|
Summary: A Python library for working with RDF
|
|
License: BSD-3-Clause
|
|
URL: http://rdflib.net/
|
|
Source: https://files.pythonhosted.org/packages/source/r/rdflib/rdflib-%{version}.tar.gz
|
|
BuildRequires: %{python_module base >= 3.8}
|
|
BuildRequires: %{python_module html5lib}
|
|
BuildRequires: %{python_module isodate}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module poetry}
|
|
BuildRequires: %{python_module pyparsing}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: %{python_module xml}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: python3-Sphinx
|
|
BuildRequires: python3-myst-parser
|
|
BuildRequires: python3-sphinx-autodoc-typehints
|
|
BuildRequires: python3-sphinxcontrib-apidoc
|
|
Requires: python-html5lib
|
|
Requires: python-isodate
|
|
Requires: python-pyparsing
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
BuildArch: noarch
|
|
%if %{with tests}
|
|
BuildRequires: %{python_module SPARQLWrapper}
|
|
BuildRequires: %{python_module flake8}
|
|
BuildRequires: %{python_module pytest}
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
RDFLib is a Python library for working with RDF, a simple yet powerful
|
|
language for representing information. The library contains an RDF/XML
|
|
parser/serializer that conforms to the RDF/XML Syntax Specification (Revised).
|
|
The library also contains both in-memory and persistent Graph backends.
|
|
|
|
%package -n %{name}-doc
|
|
Summary: A Python library for working with RDF
|
|
Provides: %{python_module rdflib-doc = %{version}}
|
|
|
|
%description -n %{name}-doc
|
|
RDFLib is a Python library for working with RDF, a simple yet powerful
|
|
language for representing information. The library contains an RDF/XML
|
|
parser/serializer that conforms to the RDF/XML Syntax Specification (Revised).
|
|
The library also contains both in-memory and persistent Graph backends.
|
|
|
|
%prep
|
|
%autosetup -p1 -n rdflib-%{version}
|
|
# remove unwanted shebang
|
|
find rdflib -name "*.py" | xargs sed -i '1 { /^#!/ d }'
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
|
|
# Build the docs, we need the module queryable
|
|
pushd docs
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib} %make_build html
|
|
# Remove hidden file
|
|
rm -r _build/html/.buildinfo
|
|
popd
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/rdfs2dot
|
|
%python_clone -a %{buildroot}%{_bindir}/rdfpipe
|
|
%python_clone -a %{buildroot}%{_bindir}/rdfgraphisomorphism
|
|
%python_clone -a %{buildroot}%{_bindir}/rdf2dot
|
|
%python_clone -a %{buildroot}%{_bindir}/csv2rdf
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%fdupes docs/_build/html
|
|
|
|
%if %{with tests}
|
|
%check
|
|
%pytest
|
|
%endif
|
|
|
|
%post
|
|
%python_install_alternative rdfs2dot
|
|
%python_install_alternative rdfpipe
|
|
%python_install_alternative rdfgraphisomorphism
|
|
%python_install_alternative rdf2dot
|
|
%python_install_alternative csv2rdf
|
|
|
|
%postun
|
|
%python_uninstall_alternative rdfs2dot
|
|
%python_uninstall_alternative rdfpipe
|
|
%python_uninstall_alternative rdfgraphisomorphism
|
|
%python_uninstall_alternative rdf2dot
|
|
%python_uninstall_alternative csv2rdf
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.md
|
|
%python_alternative %{_bindir}/csv2rdf
|
|
%python_alternative %{_bindir}/rdf2dot
|
|
%python_alternative %{_bindir}/rdfgraphisomorphism
|
|
%python_alternative %{_bindir}/rdfpipe
|
|
%python_alternative %{_bindir}/rdfs2dot
|
|
%{python_sitelib}/rdflib
|
|
%{python_sitelib}/rdflib-%{version}.dist-info
|
|
|
|
%files -n %{name}-doc
|
|
%doc docs/_build/html
|
|
|
|
%changelog
|