Bootstrap building sphinx docs because of circular dependency with sphinx.
This commit is contained in:
parent
9a237ab5a7
commit
dbe2bd34f4
@ -4,6 +4,9 @@
|
|||||||
%global py3_libbuilddir %(python3 -c 'import sys; import sysconfig; print("lib.{p}-{v[0]}.{v[1]}".format(p=sysconfig.get_platform(), v=sys.version_info))')
|
%global py3_libbuilddir %(python3 -c 'import sys; import sysconfig; print("lib.{p}-{v[0]}.{v[1]}".format(p=sysconfig.get_platform(), v=sys.version_info))')
|
||||||
|
|
||||||
%global name3 python3-pillow
|
%global name3 python3-pillow
|
||||||
|
# bootstrap building docs (pillow is required by docutils, docutils are
|
||||||
|
# required by sphinx; pillow build-requires sphinx)
|
||||||
|
%global with_docs 0
|
||||||
|
|
||||||
# RHEL-7 doesn't have python 3
|
# RHEL-7 doesn't have python 3
|
||||||
%if 0%{?rhel} == 7
|
%if 0%{?rhel} == 7
|
||||||
@ -25,7 +28,7 @@
|
|||||||
|
|
||||||
Name: python-pillow
|
Name: python-pillow
|
||||||
Version: 2.4.0
|
Version: 2.4.0
|
||||||
Release: 4%{?snap}%{?dist}
|
Release: 5%{?snap}%{?dist}
|
||||||
Summary: Python image processing library
|
Summary: Python image processing library
|
||||||
|
|
||||||
# License: see http://www.pythonware.com/products/pil/license.htm
|
# License: see http://www.pythonware.com/products/pil/license.htm
|
||||||
@ -57,8 +60,10 @@ BuildRequires: python-setuptools
|
|||||||
BuildRequires: tkinter
|
BuildRequires: tkinter
|
||||||
BuildRequires: PyQt4
|
BuildRequires: PyQt4
|
||||||
BuildRequires: numpy
|
BuildRequires: numpy
|
||||||
|
%if 0%{?with_docs}
|
||||||
BuildRequires: python-sphinx
|
BuildRequires: python-sphinx
|
||||||
BuildRequires: python-sphinx-theme-better
|
BuildRequires: python-sphinx-theme-better
|
||||||
|
%endif # with_docs
|
||||||
BuildRequires: python-cffi
|
BuildRequires: python-cffi
|
||||||
|
|
||||||
%if %{with_python3}
|
%if %{with_python3}
|
||||||
@ -67,8 +72,10 @@ BuildRequires: python3-setuptools
|
|||||||
BuildRequires: python3-tkinter
|
BuildRequires: python3-tkinter
|
||||||
BuildRequires: python3-PyQt4
|
BuildRequires: python3-PyQt4
|
||||||
BuildRequires: python3-numpy
|
BuildRequires: python3-numpy
|
||||||
|
%if 0%{?with_docs}
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-sphinx-theme-better
|
BuildRequires: python3-sphinx-theme-better
|
||||||
|
%endif # with_docs
|
||||||
BuildRequires: python3-cffi
|
BuildRequires: python3-cffi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -233,10 +240,12 @@ pushd Sane
|
|||||||
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
|
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
%if 0%{?with_docs}
|
||||||
pushd docs
|
pushd docs
|
||||||
PYTHONPATH=$PWD/../build/%py2_libbuilddir make html
|
PYTHONPATH=$PWD/../build/%py2_libbuilddir make html
|
||||||
rm -f _build/html/.buildinfo
|
rm -f _build/html/.buildinfo
|
||||||
popd
|
popd
|
||||||
|
%endif # with_docs
|
||||||
|
|
||||||
%if %{with_python3}
|
%if %{with_python3}
|
||||||
# Build Python 3 modules
|
# Build Python 3 modules
|
||||||
@ -248,10 +257,12 @@ pushd Sane
|
|||||||
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
%if 0%{?with_docs}
|
||||||
pushd docs
|
pushd docs
|
||||||
PYTHONPATH=$PWD/../build/%py3_libbuilddir make html SPHINXBUILD=sphinx-build-%python3_version
|
PYTHONPATH=$PWD/../build/%py3_libbuilddir make html SPHINXBUILD=sphinx-build-%python3_version
|
||||||
rm -f _build/html/.buildinfo
|
rm -f _build/html/.buildinfo
|
||||||
popd
|
popd
|
||||||
|
%endif # with_docs
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -319,7 +330,10 @@ popd
|
|||||||
%{py2_incdir}/Imaging/
|
%{py2_incdir}/Imaging/
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc Scripts Images docs/_build/html
|
%doc Scripts Images
|
||||||
|
%if 0%{?with_docs}
|
||||||
|
docs/_build/html
|
||||||
|
%endif # with_docs
|
||||||
|
|
||||||
%files sane
|
%files sane
|
||||||
%doc Sane/CHANGES Sane/demo*.py Sane/sanedoc.txt
|
%doc Sane/CHANGES Sane/demo*.py Sane/sanedoc.txt
|
||||||
@ -348,7 +362,10 @@ popd
|
|||||||
%{py3_incdir}/Imaging/
|
%{py3_incdir}/Imaging/
|
||||||
|
|
||||||
%files -n %{name3}-doc
|
%files -n %{name3}-doc
|
||||||
%doc Scripts Images docs/_build/html
|
%doc Scripts Images
|
||||||
|
%if 0%{?with_docs}
|
||||||
|
%doc docs/_build/html
|
||||||
|
%endif # with_docs
|
||||||
|
|
||||||
%files -n %{name3}-sane
|
%files -n %{name3}-sane
|
||||||
%doc Sane/CHANGES Sane/demo*.py Sane/sanedoc.txt
|
%doc Sane/CHANGES Sane/demo*.py Sane/sanedoc.txt
|
||||||
@ -365,6 +382,9 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 13 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.4.0-5
|
||||||
|
- Bootstrap building sphinx docs because of circular dependency with sphinx.
|
||||||
|
|
||||||
* Fri May 9 2014 Orion Poplawski <orion@cora.nwra.com> - 2.4.0-4
|
* Fri May 9 2014 Orion Poplawski <orion@cora.nwra.com> - 2.4.0-4
|
||||||
- Rebuild for Python 3.4
|
- Rebuild for Python 3.4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user