- Update to upstream version 2.5.2.

- Package depends on python-markupsafe and is noarch now.
This commit is contained in:
Thomas Moschny 2010-08-19 02:32:12 +02:00
parent a5eff88758
commit fee00bb439
3 changed files with 27 additions and 19 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
Jinja2-2.5.tar.gz /Jinja2-2.5.tar.gz
/Jinja2-2.5.2.tar.gz

View File

@ -1,7 +1,7 @@
%if 0%{?fedora} > 12 || 0%{?rhel} > 6 %if 0%{?fedora} > 12 || 0%{?rhel} > 6
%global with_python3 1 %global with_python3 1
%else %else
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif %endif
# Enable building without docs to avoid a circular dependency between this # Enable building without docs to avoid a circular dependency between this
@ -9,23 +9,28 @@
%global with_docs 0 %global with_docs 0
Name: python-jinja2 Name: python-jinja2
Version: 2.5 Version: 2.5.2
Release: 4%{?dist} Release: 1%{?dist}
Summary: General purpose template engine Summary: General purpose template engine
Group: Development/Languages Group: Development/Languages
License: BSD License: BSD
URL: http://jinja.pocoo.org/ URL: http://jinja.pocoo.org/
Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
BuildRequires: python-markupsafe
%if 0%{?with_docs} %if 0%{?with_docs}
BuildRequires: python-sphinx BuildRequires: python-sphinx
%endif # with_docs %endif # with_docs
Requires: python-babel >= 0.8 Requires: python-babel >= 0.8
Requires: python-markupsafe
%if 0%{?with_python3} %if 0%{?with_python3}
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
BuildRequires: python3-markupsafe
Requires: python3-markupsafe
# babel isn't py3k ready yet, and is only a weak dependency # babel isn't py3k ready yet, and is only a weak dependency
#Requires: python3-babel >= 0.8 #Requires: python3-babel >= 0.8
%endif # with_python3 %endif # with_python3
@ -69,6 +74,9 @@ environments.
%prep %prep
%setup -q -n Jinja2-%{version} %setup -q -n Jinja2-%{version}
# cleanup
find . -name '*.pyo' -o -name '*.pyc' -delete
# fix EOL # fix EOL
sed -i 's|\r$||g' LICENSE sed -i 's|\r$||g' LICENSE
@ -78,7 +86,7 @@ cp -a . %{py3dir}
%build %build
CFLAGS="%{optflags}" %{__python} setup.py --with-speedups build %{__python} setup.py build
# for now, we build docs using Python 2.x and use that for both # for now, we build docs using Python 2.x and use that for both
# packages. # packages.
@ -88,29 +96,24 @@ make -C docs html
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir} pushd %{py3dir}
CFLAGS="%{optflags}" %{__python3} setup.py --with-speedups build %{__python3} setup.py build
popd popd
%endif # with_python3 %endif # with_python3
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
%{__python} setup.py --with-speedups install -O1 --skip-build \ %{__python} setup.py install -O1 --skip-build \
--root %{buildroot} --root %{buildroot}
# ensure correct permission
chmod 0755 %{buildroot}%{python_sitearch}/jinja2/_speedups.so
# remove hidden file # remove hidden file
rm -rf docs/_build/html/.buildinfo rm -rf docs/_build/html/.buildinfo
%if 0%{?with_python3} %if 0%{?with_python3}
pushd %{py3dir} pushd %{py3dir}
%{__python3} setup.py --with-speedups install -O1 --skip-build \ %{__python3} setup.py install -O1 --skip-build \
--root %{buildroot} --root %{buildroot}
popd
# ensure correct permission
chmod 0755 %{buildroot}%{python3_sitearch}/jinja2/_speedups.so
%endif # with_python3 %endif # with_python3
@ -137,8 +140,8 @@ popd
%endif # with_docs %endif # with_docs
%doc ext %doc ext
%doc examples %doc examples
%{python_sitearch}/* %{python_sitelib}/*
%exclude %{python_sitearch}/jinja2/_speedups.c %exclude %{python_sitelib}/jinja2/_debugsupport.c
%if 0%{?with_python3} %if 0%{?with_python3}
@ -150,12 +153,16 @@ popd
%endif # with_docs %endif # with_docs
%doc ext %doc ext
%doc examples %doc examples
%{python3_sitearch}/* %{python3_sitelib}/*
%exclude %{python3_sitearch}/jinja2/_speedups.c %exclude %{python3_sitelib}/jinja2/_debugsupport.c
%endif # with_python3 %endif # with_python3
%changelog %changelog
* Thu Aug 19 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-1
- Update to upstream version 2.5.2.
- Package depends on python-markupsafe and is noarch now.
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-4 * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-4
- add explicit build-requirement on python-setuptools - add explicit build-requirement on python-setuptools
- fix doc disablement for python3 subpackage - fix doc disablement for python3 subpackage

View File

@ -1 +1 @@
d02f82e33afe918cef8a9abcd23ccd78 Jinja2-2.5.tar.gz 3829be2926a067ee024e6d3e5327dbf7 Jinja2-2.5.2.tar.gz