2014-01-10 19:15:15 +00:00
|
|
|
%if 0%{?fedora}
|
2010-07-13 22:21:52 +00:00
|
|
|
%global with_python3 1
|
|
|
|
%endif
|
2008-07-24 07:56:09 +00:00
|
|
|
|
2010-07-22 04:37:25 +00:00
|
|
|
# Enable building without docs to avoid a circular dependency between this
|
|
|
|
# and python-sphinx:
|
2014-06-07 07:03:03 +00:00
|
|
|
%global with_docs 1
|
2010-07-22 04:37:25 +00:00
|
|
|
|
2015-07-26 22:15:37 +00:00
|
|
|
Name: python-jinja2
|
|
|
|
Version: 2.8
|
2016-02-05 11:44:20 +00:00
|
|
|
Release: 5%{?dist}
|
2015-07-26 22:15:37 +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
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
BuildRequires: python-markupsafe
|
|
|
|
BuildRequires: pytest
|
2010-07-22 04:37:25 +00:00
|
|
|
%if 0%{?with_docs}
|
2015-07-26 22:15:37 +00:00
|
|
|
BuildRequires: python-sphinx
|
2010-07-22 04:37:25 +00:00
|
|
|
%endif # with_docs
|
2015-07-26 22:15:37 +00:00
|
|
|
Requires: python-babel >= 0.8
|
|
|
|
Requires: python-markupsafe
|
|
|
|
Requires: python-setuptools
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-07-26 22:15:37 +00:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
BuildRequires: python3-markupsafe
|
|
|
|
BuildRequires: python3-pytest
|
2010-07-13 22:21:52 +00:00
|
|
|
%endif # with_python3
|
|
|
|
|
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
|
2015-07-26 22:15:37 +00:00
|
|
|
Summary: General purpose template engine
|
|
|
|
Group: Development/Languages
|
|
|
|
Requires: python3-markupsafe
|
|
|
|
Requires: python3-setuptools
|
2010-11-01 16:17:07 +00:00
|
|
|
# babel isn't py3k ready yet, and is only a weak dependency
|
2015-07-26 22:15:37 +00:00
|
|
|
#Requires: python3-babel >= 0.8
|
2010-07-13 22:21:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
%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
|
2015-07-27 06:05:27 +00:00
|
|
|
%setup -qc -n Jinja2-%{version}
|
|
|
|
mv Jinja2-%{version} python2
|
|
|
|
|
|
|
|
pushd python2
|
2008-07-24 07:56:09 +00:00
|
|
|
|
2010-08-19 00:32:12 +00:00
|
|
|
# cleanup
|
|
|
|
find . -name '*.pyo' -o -name '*.pyc' -delete
|
|
|
|
|
2010-02-23 22:48:10 +00:00
|
|
|
# fix EOL
|
|
|
|
sed -i 's|\r$||g' LICENSE
|
|
|
|
|
2015-07-27 06:05:27 +00:00
|
|
|
popd
|
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-07-27 06:05:27 +00:00
|
|
|
cp -a python2 python3
|
2010-07-13 22:21:52 +00:00
|
|
|
%endif # with_python3
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
|
|
|
|
%build
|
2015-07-27 06:05:27 +00:00
|
|
|
pushd python2
|
2015-07-26 22:15:37 +00:00
|
|
|
%{__python2} setup.py build
|
2010-07-13 22:21:52 +00:00
|
|
|
|
|
|
|
# for now, we build docs using Python 2.x and use that for both
|
|
|
|
# packages.
|
2010-07-22 04:37:25 +00:00
|
|
|
%if 0%{?with_docs}
|
2013-08-16 18:16:34 +00:00
|
|
|
make -C docs html PYTHONPATH=$(pwd)
|
2010-07-22 04:37:25 +00:00
|
|
|
%endif # with_docs
|
2015-07-27 06:05:27 +00:00
|
|
|
popd
|
2008-07-24 07:56:09 +00:00
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-07-27 06:05:27 +00:00
|
|
|
pushd python3
|
2010-08-19 00:32:12 +00:00
|
|
|
%{__python3} setup.py build
|
2010-07-13 22:21:52 +00:00
|
|
|
popd
|
|
|
|
%endif # with_python3
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
|
|
|
|
%install
|
2015-07-27 06:05:27 +00:00
|
|
|
pushd python2
|
2015-07-26 22:15:37 +00:00
|
|
|
%{__python2} setup.py install -O1 --skip-build \
|
|
|
|
--root %{buildroot}
|
2008-07-24 07:56:09 +00:00
|
|
|
|
2009-09-20 16:10:00 +00:00
|
|
|
# remove hidden file
|
|
|
|
rm -rf docs/_build/html/.buildinfo
|
2015-07-27 06:05:27 +00:00
|
|
|
popd
|
2009-09-20 16:10:00 +00:00
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-07-27 06:05:27 +00:00
|
|
|
pushd python3
|
2010-08-19 00:32:12 +00:00
|
|
|
%{__python3} setup.py install -O1 --skip-build \
|
2015-07-26 22:15:37 +00:00
|
|
|
--root %{buildroot}
|
2010-08-19 00:32:12 +00:00
|
|
|
popd
|
2010-07-13 22:21:52 +00:00
|
|
|
%endif # with_python3
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
|
2010-02-23 22:48:10 +00:00
|
|
|
%check
|
2015-07-27 06:05:27 +00:00
|
|
|
pushd python2
|
2016-02-05 11:44:20 +00:00
|
|
|
# there are currently no tests in the jinja2 tarball
|
|
|
|
# make test
|
2015-07-27 06:05:27 +00:00
|
|
|
popd
|
2010-02-23 22:48:10 +00:00
|
|
|
|
2010-07-13 22:21:52 +00:00
|
|
|
%if 0%{?with_python3}
|
2015-07-27 06:05:27 +00:00
|
|
|
pushd python3
|
2016-02-05 11:44:20 +00:00
|
|
|
# there are currently no tests in the jinja2 tarball
|
|
|
|
# make test
|
2010-07-13 22:21:52 +00:00
|
|
|
popd
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
%files
|
2015-07-27 06:05:27 +00:00
|
|
|
%doc python2/AUTHORS
|
|
|
|
%doc python2/CHANGES
|
|
|
|
%if 0%{?_licensedir:1}
|
|
|
|
%license python2/LICENSE
|
|
|
|
%else
|
|
|
|
%doc python2/LICENSE
|
|
|
|
%endif # licensedir
|
2010-07-22 04:37:25 +00:00
|
|
|
%if 0%{?with_docs}
|
2015-07-27 06:05:27 +00:00
|
|
|
%doc python2/docs/_build/html
|
2010-07-22 04:37:25 +00:00
|
|
|
%endif # with_docs
|
2015-07-27 06:05:27 +00:00
|
|
|
%doc python2/ext
|
|
|
|
%doc python2/examples
|
2015-07-26 22:15:37 +00:00
|
|
|
%{python2_sitelib}/jinja2
|
|
|
|
%{python2_sitelib}/Jinja2-%{version}-py?.?.egg-info
|
|
|
|
%exclude %{python2_sitelib}/jinja2/_debugsupport.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
|
2015-07-27 06:05:27 +00:00
|
|
|
%doc python3/AUTHORS
|
|
|
|
%doc python3/CHANGES
|
|
|
|
%if 0%{?_licensedir:1}
|
|
|
|
%license python3/LICENSE
|
|
|
|
%else
|
|
|
|
%doc python3/LICENSE
|
|
|
|
%endif # licensedir
|
2010-07-22 04:47:51 +00:00
|
|
|
%if 0%{?with_docs}
|
2015-07-27 06:05:27 +00:00
|
|
|
# docs are built with python2
|
|
|
|
%doc python2/docs/_build/html
|
2010-07-22 04:47:51 +00:00
|
|
|
%endif # with_docs
|
2015-07-27 06:05:27 +00:00
|
|
|
%doc python3/ext
|
|
|
|
%doc python3/examples
|
2015-07-26 22:15:37 +00:00
|
|
|
%{python3_sitelib}/jinja2
|
|
|
|
%{python3_sitelib}/Jinja2-%{version}-py?.?.egg-info
|
2010-08-19 00:32:12 +00:00
|
|
|
%exclude %{python3_sitelib}/jinja2/_debugsupport.c
|
2010-07-13 22:21:52 +00:00
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
2008-07-24 07:56:09 +00:00
|
|
|
%changelog
|
2016-02-05 11:44:20 +00:00
|
|
|
* Fri Feb 5 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.8-5
|
|
|
|
- Do not call py.test, there are currently no tests in the tarball.
|
|
|
|
|
2016-02-04 19:57:36 +00:00
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
|
2015-10-12 12:08:49 +00:00
|
|
|
* Mon Oct 12 2015 Robert Kuska <rkuska@redhat.com> - 2.8-3
|
|
|
|
- Rebuilt for Python3.5 rebuild
|
|
|
|
|
2015-07-27 06:05:27 +00:00
|
|
|
* Mon Jul 27 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.8-2
|
|
|
|
- Apply updates Python packaging guidelines.
|
|
|
|
- Mark LICENSE with %%license.
|
|
|
|
|
2015-07-26 22:15:37 +00:00
|
|
|
* Sun Jul 26 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.8-1
|
|
|
|
- Upstream 2.8
|
|
|
|
|
2015-06-18 19:41:59 +00:00
|
|
|
* 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
|
|
|
|
|
2014-12-02 17:09:31 +00:00
|
|
|
* Tue Dec 2 2014 Orion Poplawski <orion@cora.nwra.com> - 2.7.3-2
|
|
|
|
- Add Requires python(3)-setuptools (bug #1168774)
|
|
|
|
|
2014-06-07 07:03:03 +00:00
|
|
|
* Sat Jun 7 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.3-1
|
|
|
|
- Update to 2.7.3.
|
|
|
|
- Reenable docs.
|
|
|
|
|
2014-05-10 15:39:30 +00:00
|
|
|
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 2.7.2-2
|
|
|
|
- Bootstrap (without docs) build for Python 3.4
|
|
|
|
|
2014-01-10 19:15:15 +00:00
|
|
|
* Fri Jan 10 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.2-1
|
|
|
|
- Update to 2.7.2.
|
|
|
|
- Update python3 conditional.
|
|
|
|
|
2013-08-16 16:57:11 +00:00
|
|
|
* Fri Aug 16 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.1-1
|
|
|
|
- Update to 2.7.1.
|
|
|
|
|
2013-07-25 21:16:36 +00:00
|
|
|
* Thu Jul 25 2013 Orion Poplawski <orion@cora.nwra.com> - 2.7-1
|
|
|
|
- Update to 2.7
|
|
|
|
- spec cleanup
|
|
|
|
|
2013-02-14 19:42:09 +00:00
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
|
2012-08-04 10:52:22 +00:00
|
|
|
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-5
|
|
|
|
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
|
|
|
|
|
2012-08-03 16:26:42 +00:00
|
|
|
* Fri Aug 3 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-4
|
|
|
|
- remove rhel logic from with_python3 conditional
|
|
|
|
|
2012-07-21 06:46:10 +00:00
|
|
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
|
|
2012-01-14 01:49:10 +00:00
|
|
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
|
|
2011-07-26 00:22:14 +00:00
|
|
|
* Mon Jul 25 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.6-1
|
|
|
|
- Update to 2.6.
|
|
|
|
|
2011-02-09 04:26:34 +00:00
|
|
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.5-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
|
2011-01-18 00:51:11 +00:00
|
|
|
* Tue Jan 18 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-3
|
|
|
|
- Re-enable html doc generation.
|
|
|
|
- Remove conditional for F-12 and below.
|
|
|
|
- Do not silently fail the testsuite for with py3k.
|
|
|
|
|
2010-11-01 16:17:07 +00:00
|
|
|
* Mon Nov 1 2010 Michel Salim <salimma@fedoraproject.org> - 2.5.5-2
|
|
|
|
- Move python3 runtime requirements to python3 subpackage
|
|
|
|
|
2010-10-27 08:16:01 +00:00
|
|
|
* Wed Oct 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-1
|
|
|
|
- Update to 2.5.5.
|
|
|
|
|
2010-08-25 20:02:12 +00:00
|
|
|
* Wed Aug 25 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-4
|
|
|
|
- Revert to previous behavior: fail the build on failed test.
|
|
|
|
- Rebuild for Python 3.2.
|
|
|
|
|
2010-08-25 15:00:04 +00:00
|
|
|
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-3
|
|
|
|
- %%ifnarch doesn't work on noarch package so don't fail the build on failed tests
|
|
|
|
|
2010-08-25 13:52:38 +00:00
|
|
|
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-2
|
|
|
|
- disable the testsuite on s390(x)
|
|
|
|
|
2010-08-19 00:32:12 +00:00
|
|
|
* 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.
|
|
|
|
|
2010-07-22 04:46:18 +00:00
|
|
|
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-4
|
|
|
|
- add explicit build-requirement on python-setuptools
|
2010-07-22 04:47:51 +00:00
|
|
|
- fix doc disablement for python3 subpackage
|
2010-07-22 04:46:18 +00:00
|
|
|
|
2010-07-22 04:37:25 +00:00
|
|
|
* 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
|
|
|
|
|
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.
|
2015-07-26 22:15:37 +00:00
|
|
|
- Create python3 subpackage.
|
2010-07-13 22:21:52 +00:00
|
|
|
- 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.
|