%global srcname ics Name: python-%{srcname} Version: 3.0 Release: 2%{?dist} Summary: Intrepidcs icsneo40 Python API/Wrapper License: MIT URL: https://github.com/intrepidcs/python_%{srcname}/ Source0: https://github.com/intrepidcs/python_%{srcname}/archive/%{version}/python_%{srcname}-%{version}.tar.gz %define _description \ Python C Code module for interfacing to the icsneo40 dynamic library. Code tries\ to respect PEP 8 (https://www.python.org/dev/peps/pep-0008/). Function naming\ convention does not follow the tradition c style icsneo40 naming convention as\ the python_ics module name acts as the namespace (icsneo portion of the\ function) and function names are suppose to be lowercase with underscores\ instead of mixedCase like icsneo API. %description %_description %package doc Summary: Documentation for the 'python_%{srcname}' python module BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx_rtd_theme BuildArch: noarch %description doc Documentation for the 'python_%{srcname}' python module %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} BuildRequires: gcc-c++ BuildRequires: python%{python3_pkgversion}-devel Requires: icsneoapi %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %if 0%{?fedora} || 0%{?rhel} >= 8 Suggests: %{name}-doc = %{version}-%{release} %endif # fedora || rhel >= 8 %description -n python%{python3_pkgversion}-%{srcname} %_description %prep %autosetup -p1 -n python_%{srcname}-%{version} sed -e '0,/^# License - MIT/d' README.md > LICENSE %build %py3_build PYTHONPATH=$PWD/build/lib.%{python3_platform}-%{python3_version} \ %make_build -C doc html man SPHINXBUILD=sphinx-build-%{python3_version} rm doc/build/html/.buildinfo %install %py3_install install -p -m0644 -D doc/build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1 %files doc %license LICENSE %doc doc/build/html %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc README.md %{python3_sitearch}/%{srcname}.*.so %{python3_sitearch}/python_%{srcname}-%{version}-py%{python3_version}.egg-info/ %{_mandir}/man1/%{srcname}.1.* %changelog * Mon Apr 08 2019 Scott K Logan - 3.0-2 - Preserve man timestamp - Don't hardcode man extension - Split LICENSE out of README.md * Tue Apr 02 2019 Scott K Logan - 3.0-1 - Update to 3.0 * Thu Sep 20 2018 Scott K Logan - 2.15-1 - Initial package