Conditionalize the ImageMagick build dependency & tests
This commit is contained in:
parent
9e75ecd41f
commit
baac7bad24
@ -4,6 +4,13 @@
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} > 7
|
||||
# Build without BuildRequires ImageMagick, to skip imgconverter tests
|
||||
%bcond_with imagemagick_tests
|
||||
%else
|
||||
%bcond_without imagemagick_tests
|
||||
%endif
|
||||
|
||||
# Currently, python2 version is always the default: https://fedoraproject.org/wiki/Packaging:Python#Naming
|
||||
%if 1
|
||||
%global py3_default 0
|
||||
@ -15,7 +22,7 @@
|
||||
|
||||
Name: python-sphinx
|
||||
Version: 1.7.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Python documentation generator
|
||||
|
||||
@ -80,7 +87,9 @@ BuildRequires: python2-html5lib
|
||||
BuildRequires: python2-whoosh
|
||||
BuildRequires: python2-snowballstemmer
|
||||
BuildRequires: python2-enum34
|
||||
%if %{with imagemagick_tests}
|
||||
BuildRequires: ImageMagick
|
||||
%endif
|
||||
# note: no Python3 xapian binding yet
|
||||
BuildRequires: python2-xapian
|
||||
BuildRequires: texlive-collection-fontsrecommended
|
||||
@ -385,12 +394,15 @@ cp %{SOURCE5} .
|
||||
# fix line encoding of bundled jquery.js
|
||||
dos2unix -k ./sphinx/themes/basic/static/jquery.js
|
||||
|
||||
%if ! %{with imagemagick_tests}
|
||||
rm tests/test_ext_imgconverter.py
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if 0%{?with_python3}
|
||||
@ -578,6 +590,9 @@ popd
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Apr 11 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.2-2
|
||||
- Conditionalize the ImageMagick build dependency & tests
|
||||
|
||||
* Wed Apr 11 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.2-1
|
||||
- Update to 1.7.2 (bz#1558968)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user