%bcond_without tests %global pypi_name owlrl %global _description %{expand: A simple implementation of the OWL2 RL Profile, as well as a basic RDFS inference, on top of RDFLib. Based mechanical forward chaining. The distribution contains: * scripts/RDFConvertService: can be used as a CGI script to invoke the library. It may have to be adapted to the local server setup. * scripts/owlrl: script that can be run locally on to transform a file into RDF (on the standard output). Run the script with -h to get the available flags.} Name: python-owl_rl Version: 5.2.3 Release: 2%{?dist} Summary: OWL-RL and RDFS based RDF Closure inferencing for Python License: W3C URL: https://github.com/RDFLib/OWL-RL Source0: https://github.com/RDFLib/OWL-RL/archive/v%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description %_description %package -n python3-owl_rl Summary: %{summary} BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} BuildRequires: %{py3_dist rdflib} # Remove rdflib-jsonld from deps when rdflib >= 6.0.0 comes BuildRequires: %{py3_dist rdflib-jsonld} Requires: %{py3_dist rdflib-jsonld} %if %{with tests} BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist lxml} BuildRequires: %{py3_dist pyyaml} %endif %py_provides python3-owl_rl Obsoletes: python3-owlrl <= 5.2.1-3 %description -n python3-owl_rl %_description %package doc Summary: %{summary} BuildRequires: %{py3_dist sphinx} BuildRequires: %{py3_dist sphinx_rtd_theme} %description doc %_description %prep %autosetup -n OWL-RL-%{version} rm -rf %{pypi_name}.egg-info find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' # Remove unnecessary shebang from the file sed -i '1d' owlrl/OWLRL.py # Remove pathlib from install_requires from setup.py sed -i -e 's/, "pathlib"//g' setup.py %build %py3_build # Build documentation pushd docs PYTHONPATH=. sphinx-build-3 source html rm -rvf html/.buildinfo rm -rvf html/.doctrees popd %install %py3_install %check %if %{with tests} # test_version_converter needs an internet connection, therefore disabled %pytest -k 'not cls_maxqc1' \ --deselect test/test_version_converter.py %endif %files -n python3-owl_rl %doc README.rst %license LICENSE.txt %{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/owlrl-%{version}-py%{python3_version}.egg-info/ %{_bindir}/owlrl %{_bindir}/RDFConvertService %files doc %license LICENSE.txt %doc docs/html %changelog * Fri Jan 21 2022 Fedora Release Engineering - 5.2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Oct 24 2021 Aniket Pradhan - 5.2.3-1 - Update to v5.2.3 - Mention rdflib-jsonld as an explicit requirement because the current version of rdflib is < 6 * Fri Jul 23 2021 Fedora Release Engineering - 5.2.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Jun 17 2021 Aniket Pradhan - 5.2.1-5 - Fix Obsoletes version * Thu Jun 17 2021 Aniket Pradhan - 5.2.1-4 - Fix subpackage name * Fri Jun 04 2021 Python Maint - 5.2.1-3 - Rebuilt for Python 3.10 * Wed May 26 2021 Aniket Pradhan - 5.2.1-2 - Fix description * Mon May 10 2021 Aniket Pradhan - 5.2.1-1 - Initial build