%bcond_without tests %global pypi_name owlrl %global _description %{expand: odML (open metadata Markup Language) is a file format for storing arbitrary metadata. The underlying data model offers a way to store metadata in a structured human- and machine-readable way. Well organized metadata management is a key component to guarantee reproducibility of experiments and to track provenance of performed analyses. python-odml is the python library for reading and writing odml metadata files. It is a registered research resource with the RRID:SCR_001376.} Name: python-owl_rl Version: 5.2.1 Release: 1%{?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 # Updated license text from upstream # Latest release still has the older version of the current license Source1: https://raw.githubusercontent.com/RDFLib/OWL-RL/master/LICENSE.txt BuildArch: noarch %description %_description %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} BuildRequires: %{py3_dist rdflib} BuildRequires: %{py3_dist rdflib-jsonld} %if %{with tests} BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist lxml} BuildRequires: %{py3_dist pyyaml} %endif %py_provides python3-%{pypi_name} %description -n python3-%{pypi_name} %_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 # Replace the license with the updated license # https://github.com/RDFLib/OWL-RL/commit/d1ab5e19ed1e537b06a4dbad50cc51c5d52db889 cp %{SOURCE1} ./ %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-%{pypi_name} %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 * Mon May 10 2021 Aniket Pradhan - 5.2.1-1 - Initial build