%bcond_without tests %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: %autorelease 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}/owlrl-%{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 owlrl.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}/owlrl/ %{python3_sitelib}/owlrl-%{version}-py%{python3_version}.egg-info/ %{_bindir}/owlrl %{_bindir}/RDFConvertService %files doc %license LICENSE.txt %doc docs/html %changelog %autochangelog