2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
|
|
|
|
%global with_python3 1
|
|
|
|
%else
|
|
|
|
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
%endif
|
2008-07-24 07:56:09 +00:00
|
|
|
|
|
|
|
Name: python-jinja2
|
2010-07-13 22:21:52 +00:00
|
|
|
Version: 2.5
|
2010-07-22 04:30:26 +00:00
|
|
|
Release: 2%{?dist}
|
2008-07-24 07:56:09 +00:00
|
|
|
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
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
BuildRequires: python-devel
|
2010-02-23 22:48:10 +00:00
|
|
|
BuildRequires: python-sphinx
|
2008-07-24 07:56:09 +00:00
|
|
|
Requires: python-babel >= 0.8
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
# babel isn't py3k ready yet, and is only a weak dependency
|
|
|
|
#Requires: python3-babel >= 0.8
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
%if 0%{?fedora} < 13
|
|
|
|
BuildRequires: python-setuptools-devel
|
|
|
|
%endif
|
2008-07-24 07:56:09 +00:00
|
|
|
|
2010-02-23 22:48:10 +00:00
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
%description
|
|
|
|
Jinja2 is a template engine written in pure Python. It provides a
|
|
|
|
Django inspired non-XML syntax but supports inline expressions and an
|
|
|
|
optional sandboxed environment.
|
|
|
|
|
|
|
|
If you have any exposure to other text-based template languages, such
|
|
|
|
as Smarty or Django, you should feel right at home with Jinja2. It's
|
|
|
|
both designer and developer friendly by sticking to Python's
|
|
|
|
principles and adding functionality useful for templating
|
|
|
|
environments.
|
|
|
|
|
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
%package -n python3-jinja2
|
|
|
|
Summary: General purpose template engine
|
|
|
|
Group: Development/Languages
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-jinja2
|
|
|
|
Jinja2 is a template engine written in pure Python. It provides a
|
|
|
|
Django inspired non-XML syntax but supports inline expressions and an
|
|
|
|
optional sandboxed environment.
|
|
|
|
|
|
|
|
If you have any exposure to other text-based template languages, such
|
|
|
|
as Smarty or Django, you should feel right at home with Jinja2. It's
|
|
|
|
both designer and developer friendly by sticking to Python's
|
|
|
|
principles and adding functionality useful for templating
|
|
|
|
environments.
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n Jinja2-%{version}
|
|
|
|
|
2010-02-23 22:48:10 +00:00
|
|
|
# fix EOL
|
|
|
|
sed -i 's|\r$||g' LICENSE
|
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
%endif # with_python3
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
|
|
|
|
%build
|
2010-07-13 22:21:52 +00:00
|
|
|
CFLAGS="%{optflags}" %{__python} setup.py --with-speedups build
|
|
|
|
|
|
|
|
# for now, we build docs using Python 2.x and use that for both
|
|
|
|
# packages.
|
2010-02-23 22:48:10 +00:00
|
|
|
make -C docs html
|
2008-07-24 07:56:09 +00:00
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
pushd %{py3dir}
|
|
|
|
CFLAGS="%{optflags}" %{__python3} setup.py --with-speedups build
|
|
|
|
popd
|
|
|
|
%endif # with_python3
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
2009-09-20 16:10:00 +00:00
|
|
|
%{__python} setup.py --with-speedups install -O1 --skip-build \
|
|
|
|
--root %{buildroot}
|
2008-07-24 07:56:09 +00:00
|
|
|
|
2009-09-20 16:10:00 +00:00
|
|
|
# ensure correct permission
|
|
|
|
chmod 0755 %{buildroot}%{python_sitearch}/jinja2/_speedups.so
|
|
|
|
|
|
|
|
# remove hidden file
|
|
|
|
rm -rf docs/_build/html/.buildinfo
|
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
pushd %{py3dir}
|
|
|
|
%{__python3} setup.py --with-speedups install -O1 --skip-build \
|
|
|
|
--root %{buildroot}
|
|
|
|
|
|
|
|
# ensure correct permission
|
|
|
|
chmod 0755 %{buildroot}%{python3_sitearch}/jinja2/_speedups.so
|
|
|
|
%endif # with_python3
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
2010-02-23 22:48:10 +00:00
|
|
|
%check
|
|
|
|
make test
|
|
|
|
|
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
pushd %{py3dir}
|
|
|
|
make test
|
|
|
|
popd
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2010-02-23 22:48:10 +00:00
|
|
|
%doc AUTHORS CHANGES LICENSE
|
|
|
|
%doc docs/_build/html
|
|
|
|
%doc ext
|
2010-07-13 22:21:52 +00:00
|
|
|
%doc examples
|
2008-07-24 07:56:09 +00:00
|
|
|
%{python_sitearch}/*
|
2010-02-23 22:48:10 +00:00
|
|
|
%exclude %{python_sitearch}/jinja2/_speedups.c
|
2008-07-24 07:56:09 +00:00
|
|
|
|
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
%files -n python3-jinja2
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc AUTHORS CHANGES LICENSE
|
|
|
|
%doc docs/_build/html
|
|
|
|
%doc ext
|
|
|
|
%doc examples
|
|
|
|
%{python3_sitearch}/*
|
|
|
|
%exclude %{python3_sitearch}/jinja2/_speedups.c
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
%changelog
|
2010-07-22 04:30:26 +00:00
|
|
|
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
|
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
* Tue Jul 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5-1
|
|
|
|
- Update to upstream version 2.5.
|
|
|
|
- Create python3 subpackage.
|
|
|
|
- Minor specfile fixes.
|
|
|
|
- Add examples directory.
|
|
|
|
- Thanks to Gareth Armstrong for additional hints.
|
|
|
|
|
2010-04-21 11:13:48 +00:00
|
|
|
* Wed Apr 21 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.1-1
|
|
|
|
- Update to 2.4.1.
|
|
|
|
|
2010-04-13 17:10:05 +00:00
|
|
|
* Tue Apr 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4-1
|
|
|
|
- Update to 2.4.
|
|
|
|
|
2010-02-23 22:48:10 +00:00
|
|
|
* Tue Feb 23 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.1-1
|
|
|
|
- Update to 2.3.1.
|
|
|
|
- Docs are built using Sphinx now.
|
|
|
|
- Run the testsuite.
|
|
|
|
|
2009-09-20 16:10:00 +00:00
|
|
|
* Sat Sep 19 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-1
|
|
|
|
- Update to 2.2.1, mainly a bugfix release.
|
|
|
|
- Remove patch no longer needed.
|
|
|
|
- Remove conditional for FC-8.
|
|
|
|
- Compilation of speedup module has to be explicitly requested now.
|
|
|
|
|
2009-07-26 20:29:42 +00:00
|
|
|
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
|
2009-02-26 21:53:35 +00:00
|
|
|
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
|
|
2009-01-10 15:27:07 +00:00
|
|
|
* Sat Jan 10 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-1
|
|
|
|
- Update to 2.1.1 (bugfix release).
|
|
|
|
|
2008-12-18 14:34:13 +00:00
|
|
|
* Thu Dec 18 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.1-1
|
|
|
|
- Update to 2.1, which fixes a number of bugs.
|
|
|
|
See http://jinja.pocoo.org/2/documentation/changelog#version-2-1.
|
|
|
|
|
2008-11-29 15:36:04 +00:00
|
|
|
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0-3
|
|
|
|
- Rebuild for Python 2.6
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
* Tue Jul 22 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-2
|
|
|
|
- Use rpm buildroot macro instead of RPM_BUILD_ROOT.
|
|
|
|
|
|
|
|
* Sun Jul 20 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-1
|
|
|
|
- Upstream released 2.0.
|
|
|
|
|
|
|
|
* Sun Jun 29 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-0.1.rc1
|
|
|
|
- Modified specfile from the existing python-jinja package.
|