- support disabling documentation in the build to break a circular

build-time dependency with python-sphinx; disable docs for now
This commit is contained in:
dmalcolm 2010-07-22 04:37:25 +00:00
parent 55440cb69f
commit eb93b317f4

View File

@ -4,9 +4,13 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
# Enable building without docs to avoid a circular dependency between this
# and python-sphinx:
%global with_docs 0
Name: python-jinja2
Version: 2.5
Release: 2%{?dist}
Release: 3%{?dist}
Summary: General purpose template engine
Group: Development/Languages
License: BSD
@ -14,7 +18,9 @@ URL: http://jinja.pocoo.org/
Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel
%if 0%{?with_docs}
BuildRequires: python-sphinx
%endif # with_docs
Requires: python-babel >= 0.8
%if 0%{?with_python3}
BuildRequires: python3-devel
@ -75,7 +81,9 @@ CFLAGS="%{optflags}" %{__python} setup.py --with-speedups build
# for now, we build docs using Python 2.x and use that for both
# packages.
%if 0%{?with_docs}
make -C docs html
%endif # with_docs
%if 0%{?with_python3}
pushd %{py3dir}
@ -123,7 +131,9 @@ popd
%files
%defattr(-,root,root,-)
%doc AUTHORS CHANGES LICENSE
%if 0%{?with_docs}
%doc docs/_build/html
%endif # with_docs
%doc ext
%doc examples
%{python_sitearch}/*
@ -143,6 +153,10 @@ popd
%changelog
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-3
- support disabling documentation in the build to break a circular build-time
dependency with python-sphinx; disable docs for now
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild