Add bcond to build filelock without docs

epel9
Tomas Hrnciar 4 years ago
parent 0ab93cf076
commit 9bb6780123

@ -21,7 +21,8 @@ file locking mechanism for Python.
The lock includes a lock counter and is thread safe. This means, when locking
the same lock object twice, it will not block.
%bcond_without docs
%if %{with docs}
%package doc
Summary: Documentation for %{srcname}, %{summary}
BuildRequires: make
@ -30,6 +31,7 @@ BuildRequires: python%{python3_pkgversion}-sphinx-theme-alabaster
%description doc
%{summary}
%endif
%if 0%{?with_python2}
@ -87,8 +89,10 @@ the same lock object twice, it will not block.
%py3_build
%endif # with_python3
%if %{with docs}
%make_build -C docs html man SPHINXBUILD=sphinx-build-%{python3_version}
rm docs/build/html/.buildinfo
%endif
%install
@ -100,7 +104,9 @@ rm docs/build/html/.buildinfo
%py3_install
%endif # with_python3
%if %{with docs}
install -p -m0644 -D docs/build/man/py-%{srcname}.1 %{buildroot}%{_mandir}/man1/py-%{srcname}.1
%endif
%check
@ -113,9 +119,11 @@ install -p -m0644 -D docs/build/man/py-%{srcname}.1 %{buildroot}%{_mandir}/man1/
%endif # with_python3
%if %{with docs}
%files doc
%license LICENSE
%doc docs/build/html
%endif
%if 0%{?with_python2}
%files -n python2-%{srcname}
@ -134,7 +142,9 @@ install -p -m0644 -D docs/build/man/py-%{srcname}.1 %{buildroot}%{_mandir}/man1/
%{python3_sitelib}/%{srcname}.py
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/__pycache__/%{srcname}*.py[co]
%if %{with docs}
%{_mandir}/man1/py-%{srcname}.1.gz
%endif
%endif # with_python3

Loading…
Cancel
Save