Upstream 2.8

This commit is contained in:
Haïkel Guémar 2015-07-27 00:15:37 +02:00
parent 49a7d7b434
commit 56175d160d

View File

@ -1,37 +1,37 @@
%if 0%{?fedora}
%global with_python3 1
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif
%global pypi_name jinja2
# Enable building without docs to avoid a circular dependency between this
# and python-sphinx:
%global with_docs 1
Name: python-jinja2
Version: 2.7.3
Release: 3%{?dist}
Summary: General purpose template engine
Group: Development/Languages
License: BSD
URL: http://jinja.pocoo.org/
Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
# see https://github.com/mitsuhiko/jinja2/pull/259
Patch0: 99d0f3165ace0befd9eafd661be6e0c23d5f9ba5.patch
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python-markupsafe
Name: python-jinja2
Version: 2.8
Release: 1%{?dist}
Summary: General purpose template engine
Group: Development/Languages
License: BSD
URL: http://jinja.pocoo.org/
Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-markupsafe
BuildRequires: pytest
%if 0%{?with_docs}
BuildRequires: python-sphinx
BuildRequires: python-sphinx
%endif # with_docs
Requires: python-babel >= 0.8
Requires: python-markupsafe
Requires: python-setuptools
Requires: python-babel >= 0.8
Requires: python-markupsafe
Requires: python-setuptools
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-markupsafe
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-markupsafe
BuildRequires: python3-pytest
%endif # with_python3
@ -49,12 +49,12 @@ environments.
%if 0%{?with_python3}
%package -n python3-jinja2
Summary: General purpose template engine
Group: Development/Languages
Requires: python3-markupsafe
Requires: python3-setuptools
Summary: General purpose template engine
Group: Development/Languages
Requires: python3-markupsafe
Requires: python3-setuptools
# babel isn't py3k ready yet, and is only a weak dependency
#Requires: python3-babel >= 0.8
#Requires: python3-babel >= 0.8
%description -n python3-jinja2
@ -72,7 +72,6 @@ environments.
%prep
%setup -q -n Jinja2-%{version}
%patch0 -p1
# cleanup
find . -name '*.pyo' -o -name '*.pyc' -delete
@ -86,7 +85,7 @@ cp -a . %{py3dir}
%build
%{__python} setup.py build
%{__python2} setup.py build
# for now, we build docs using Python 2.x and use that for both
# packages.
@ -102,8 +101,8 @@ popd
%install
%{__python} setup.py install -O1 --skip-build \
--root %{buildroot}
%{__python2} setup.py install -O1 --skip-build \
--root %{buildroot}
# remove hidden file
rm -rf docs/_build/html/.buildinfo
@ -111,7 +110,7 @@ rm -rf docs/_build/html/.buildinfo
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build \
--root %{buildroot}
--root %{buildroot}
popd
%endif # with_python3
@ -134,8 +133,9 @@ popd
%endif # with_docs
%doc ext
%doc examples
%{python_sitelib}/*
%exclude %{python_sitelib}/jinja2/_debugsupport.c
%{python2_sitelib}/jinja2
%{python2_sitelib}/Jinja2-%{version}-py?.?.egg-info
%exclude %{python2_sitelib}/jinja2/_debugsupport.c
%if 0%{?with_python3}
@ -146,12 +146,16 @@ popd
%endif # with_docs
%doc ext
%doc examples
%{python3_sitelib}/*
%{python3_sitelib}/jinja2
%{python3_sitelib}/Jinja2-%{version}-py?.?.egg-info
%exclude %{python3_sitelib}/jinja2/_debugsupport.c
%endif # with_python3
%changelog
* Sun Jul 26 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.8-1
- Upstream 2.8
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
@ -235,7 +239,7 @@ dependency with python-sphinx; disable docs for now
* Tue Jul 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5-1
- Update to upstream version 2.5.
- Create python3 subpackage.
- Create python3 subpackage.
- Minor specfile fixes.
- Add examples directory.
- Thanks to Gareth Armstrong for additional hints.