Compare commits

...
Sign in to create a new pull request.

52 commits

Author SHA1 Message Date
Python Maint
73b8db5fe8 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 13:31:55 +02:00
Python Maint
da96094071 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 13:58:35 +02:00
Fedora Release Engineering
3fcf5e155d Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 08:27:59 +00:00
Python Maint
159d32e143 Rebuilt for Python 3.14 2025-06-03 15:55:25 +02:00
Python Maint
811a737fb9 Bootstrap for Python 3.14 2025-06-02 23:22:52 +02:00
Lumir Balhar
9a3178e4ba Skip flaky test_elif_deep
https://github.com/pallets/jinja/issues/2079
2025-03-27 12:32:17 +01:00
Thomas Moschny
ab04c1a35a Update to 3.1.6. 2025-03-09 17:47:32 +01:00
Fedora Release Engineering
e78f795e7e Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 15:24:14 +00:00
Miro Hrončok
48d55f4742 Update to 3.1.5
- Security fix for CVE-2024-56201
- Fixes: rhzb#2333688
- Fixes: rhzb#2336377
2025-01-08 11:23:11 +01:00
Lukas Zachar
46fea4b890 Add tmt smoke test + plan
Cherry-picked from c9s.
Commit hash: 53acc26463e0248c91146bd2f6065d53fb845580
2024-07-25 11:35:07 +02:00
Fedora Release Engineering
5d9a9d69be Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 12:31:17 +00:00
Python Maint
da0819f188 Rebuilt for Python 3.13 2024-06-08 08:13:52 +02:00
Python Maint
566054026e Bootstrap for Python 3.13 2024-06-07 13:21:17 +02:00
Miro Hrončok
0aec2152b2 Make the build dependency on trio optional 2024-05-26 23:41:55 +02:00
Miro Hrončok
e84a72433e Python 3.13 fixes
- Fixes: rhzb#2245265
2024-05-23 15:32:31 +02:00
Lumir Balhar
18d1a5374f Update to 3.1.4 (rhbz#2279211) 2024-05-07 13:38:16 +02:00
Tim Landscheidt
4d9e43b39a Remove outdated sed to rename test teardown methods
The issue was fixed in 3.1.3 via
3fadee01b7

The sed turns teardown_method into teardown_method_method.
2024-03-19 00:15:42 +01:00
Fedora Release Engineering
9aeba43e96 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 05:41:08 +00:00
Fedora Release Engineering
0a28ad92e7 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 02:45:08 +00:00
Michel Lind
512d58d521
Update to 3.1.3 to fix CVE-2024-22195
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2024-01-11 10:57:45 -06:00
Karolina Surma
7bb65e9cfd Declare the license as an SPDX expression 2023-08-08 15:07:41 +02:00
Yaakov Selkowitz
fc015d1bcf Disable docs in flatpak builds
As of F39, flatpak builds will not be able to manually override macros.
2023-08-01 02:55:56 -04:00
Fedora Release Engineering
05480f2acc Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 10:44:21 +00:00
Python Maint
d228954a40 Rebuilt for Python 3.12 2023-06-16 08:18:06 +02:00
Python Maint
3c58a5d519 Bootstrap for Python 3.12 2023-06-14 00:03:28 +02:00
Yaakov Selkowitz
6eece4eaca Disable docs by default in RHEL builds
RHEL does not include some of the doc dependencies.  This is based on c9s:

8e7e566ba7
2023-05-19 13:30:43 -04:00
Sandro Mani
200fff0803 Update to 3.1.2 2023-05-02 00:21:00 +02:00
Fedora Release Engineering
ba5d786db5 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 14:08:29 +00:00
Lumir Balhar
7387df56e9 Fix compatibility with pytest 7.2.0 2022-11-14 09:11:39 +01:00
Fedora Release Engineering
e059429ee9 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 19:29:03 +00:00
Python Maint
86d162e6a1 Rebuilt for Python 3.11 2022-06-13 18:40:52 +02:00
Python Maint
5147748d39 Bootstrap for Python 3.11 2022-06-13 17:36:16 +02:00
Fedora Release Engineering
abbbe06df6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 12:57:26 +00:00
Thomas Moschny
9326937b8e Re-add BR on pytest. 2021-11-15 21:46:48 +01:00
Thomas Moschny
b498647db8 Update to 3.0.3. 2021-11-15 21:35:35 +01:00
Thomas Moschny
652a40287b Use new Python packaging guidelines.
Jinja2 version 3 does not support Python 2 anymore.
2021-11-15 21:35:30 +01:00
Karolina Surma
6f194bb41b Declare i18n extra to map the upstream package structure
Stop requiring the explicit runtime dependencies when building with
Python 3. They're read from metadata.
2021-11-10 11:32:05 +01:00
Miro Hrončok
f7a716750b Fix build with Python 3.11.0a1 2021-11-05 15:27:42 +01:00
Fedora Release Engineering
5fea553081 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 07:01:44 +00:00
Lumir Balhar
81f300b434 Update to 3.0.1 2021-07-15 19:27:33 +02:00
Python Maint
eb8d02cae6 Rebuilt for Python 3.10 2021-06-04 10:16:10 +02:00
Miro Hrončok
6be37c33e6 Temporarily ignore DeprecationWarning in get_event_loop() in tests 2021-06-02 18:04:00 +02:00
Python Maint
94e6de8860 Bootstrap for Python 3.10 2021-06-02 17:31:07 +02:00
Thomas Moschny
93898ae45c Update to 2.11.3.
Add patches to build with Python 3.10 (#1907442).
2021-02-06 14:00:59 +01:00
Fedora Release Engineering
88ca56fd31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 11:17:33 +00:00
Miro Hrončok
3e72b873ff Drop python2-jinja2 on Fedora 34+ 2020-12-21 16:09:04 +01:00
Fedora Release Engineering
43a69b9aaf - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 01:42:23 +00:00
Miro Hrončok
622b488116 Rebuilt for Python 3.9 2020-05-24 10:05:24 +02:00
Miro Hrončok
00956d349d Bootstrap for Python 3.9 2020-05-22 17:04:46 +02:00
Thomas Moschny
6aa957c8ef (Re-)Add changelog. 2020-05-22 10:20:35 +02:00
Thomas Moschny
66365eda17 Revert "Drop python2 subpackage from F33 on (#1832057)."
This reverts commit 1535c3bd30.
2020-05-22 10:18:08 +02:00
Thomas Moschny
1535c3bd30 Drop python2 subpackage from F33 on (#1832057). 2020-05-06 08:54:00 +02:00
7 changed files with 198 additions and 128 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

1
.gitignore vendored
View file

@ -1 +1,2 @@
/Jinja2-*.tar.gz
/jinja2-*.tar.gz

4
plans.fmf Normal file
View file

@ -0,0 +1,4 @@
discover:
how: fmf
execute:
how: tmt

View file

@ -1,41 +1,27 @@
%global srcname Jinja2
%global srcname jinja2
Name: python-jinja2
Version: 2.11.2
Release: 1%{?dist}
Version: 3.1.6
Release: 6%{?dist}
Summary: General purpose template engine
License: BSD
License: BSD-3-Clause
URL: https://palletsprojects.com/p/jinja/
Source0: %{pypi_source}
%if 0%{?fedora} || 0%{?rhel} > 7
# Enable python3 build by default
%bcond_without python3
%else
%bcond_with python3
%endif
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
Source0: %{pypi_source %srcname}
# Enable building without docs to avoid a circular dependency between this
# and python-sphinx:
%bcond_without docs
%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_without async
%if 0%{?rhel} || 0%{?flatpak}
%bcond_with docs
%else
%bcond_with async
%bcond_without docs
%endif
# The dependency on trio is undesired on RHEL
%bcond asyncio_tests %{undefined rhel}
BuildArch: noarch
%description
Jinja2 is a template engine written in pure Python. It provides a
%global _description %{expand:
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.
@ -43,143 +29,205 @@ 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.
environments.}
%description %_description
%if %{with python2}
%package -n python2-jinja2
Summary: General purpose template engine for python2
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-babel >= 0.8
BuildRequires: python2-markupsafe >= 0.23
Requires: python2-babel >= 0.8
Requires: python2-markupsafe >= 0.23
Requires: python2-setuptools
%{?python_provide:%python_provide python2-jinja2}
%description -n python2-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 python2
%if %{with python3}
%package -n python3-jinja2
Summary: General purpose template engine for python3
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-babel >= 0.8
BuildRequires: python3-markupsafe >= 0.23
BuildRequires: python3-pytest
%if %{with asyncio_tests}
BuildRequires: python3-trio
%endif
%if %{with docs}
BuildRequires: %{_bindir}/sphinx-build-3
BuildRequires: make
BuildRequires: python3-Pallets-Sphinx-Themes
BuildRequires: python3-Pallets-Sphinx-Themes >= 2
BuildRequires: python3-sphinxcontrib-log-cabinet
BuildRequires: python3-sphinx-issues
%endif
Requires: python3-babel >= 0.8
Requires: python3-markupsafe >= 0.23
Requires: python3-setuptools
%{?python_provide:%python_provide python3-jinja2}
%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.
%description -n python3-jinja2 %_description
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
%pyproject_extras_subpkg -n python3-jinja2 i18n
%prep
%autosetup -n %{srcname}-%{version}
%autosetup -p1 -n %{srcname}-%{version}
%generate_buildrequires
%pyproject_buildrequires -x i18n
# cleanup
find . -name '*.pyo' -o -name '*.pyc' -delete
%build
%if %{with python2}
%py2_build
%endif # with python2
%if %{with python3}
%py3_build
%pyproject_wheel
%if %{with docs}
make -C docs html PYTHONPATH=$(pwd)/src SPHINXBUILD=sphinx-build-3
# remove hidden file
rm -rf docs/_build/html/.buildinfo
%endif # with docs
%endif # with python3
rm -rvf docs/_build/html/.buildinfo
%endif
%install
%if %{with python2}
%py2_install
# these files are valid only on Python 3.6+
rm %{buildroot}%{python2_sitelib}/jinja2/asyncsupport.py
rm %{buildroot}%{python2_sitelib}/jinja2/asyncfilters.py
%endif # with python2
%if %{with python3}
%py3_install
%if ! %{with async}
# these files are valid only on Python 3.6+
rm %{buildroot}%{python3_sitelib}/jinja2/asyncsupport.py
rm %{buildroot}%{python3_sitelib}/jinja2/asyncfilters.py
%endif # ! with async
%endif # with python3
%pyproject_install
%pyproject_save_files jinja2
%check
%if %{with python3}
PYTHONPATH=$(pwd)/src %{__python3} -m pytest tests
%endif # with python3
# test_elif_deep is flaky for an unknown reason
# https://github.com/pallets/jinja/issues/2079
%pytest tests -k "not test_elif_deep" %{!?with_asyncio_tests:--ignore tests/test_async.py --ignore tests/test_async_filters.py}
%if %{with python2}
%files -n python2-jinja2
%doc CHANGES.rst
%doc ext
%doc examples
%license LICENSE.rst
%files -n python3-jinja2 -f %{pyproject_files}
%doc README.md
%doc docs/examples
%license LICENSE.txt
%if %{with docs}
%doc docs/_build/html
%endif
%{python2_sitelib}/jinja2/
%{python2_sitelib}/Jinja2-*.egg-info/
%endif # with python2
%if %{with python3}
%files -n python3-jinja2
%doc CHANGES.rst
%doc ext
%doc examples
%license LICENSE.rst
%if %{with docs}
%doc docs/_build/html
%endif
%{python3_sitelib}/jinja2/
%{python3_sitelib}/Jinja2-*.egg-info/
%endif # with python3
%changelog
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 3.1.6-6
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 3.1.6-5
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 3.1.6-3
- Rebuilt for Python 3.14
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 3.1.6-2
- Bootstrap for Python 3.14
* Sun Mar 9 2025 Thomas Moschny <thomas.moschny@gmx.de> - 3.1.6-1
- Update to 3.1.6.
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jan 08 2025 Miro Hrončok <mhroncok@redhat.com> - 3.1.5-1
- Update to 3.1.5
- Security fix for CVE-2024-56201
- Fixes: rhzb#2333688
- Fixes: rhzb#2336377
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 3.1.4-4
- Rebuilt for Python 3.13
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 3.1.4-3
- Bootstrap for Python 3.13
* Thu May 23 2024 Miro Hrončok <mhroncok@redhat.com> - 3.1.4-2
- Python 3.13 fixes
- Fixes: rhzb#2245265
* Tue May 07 2024 Lumír Balhar <lbalhar@redhat.com> - 3.1.4-1
- Update to 3.1.4 (rhbz#2279211,rhbz#2279491)
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 11 2024 Michel Lind <salimma@fedoraproject.org> - 3.1.3-1
- Update to 3.1.3 to fix CVE-2024-22195
* Tue Aug 08 2023 Karolina Surma <ksurma@redhat.com> - 3.1.2-6
- Declare the license as an SPDX expression
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 3.1.2-4
- Rebuilt for Python 3.12
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.1.2-3
- Bootstrap for Python 3.12
* Fri May 19 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.1.2-2
- Disable docs by default in RHEL builds
* Mon May 01 2023 Sandro Mani <manisandro@gmail.com> - 3.1.2-1
- Update to 3.1.2
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Nov 14 2022 Lumír Balhar <lbalhar@redhat.com> - 3.0.3-6
- Fix compatibility with pytest 7.2
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.0.3-4
- Rebuilt for Python 3.11
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.0.3-3
- Bootstrap for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Nov 15 2021 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.3-1
- Update to 3.0.3.
* Mon Nov 15 2021 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.1-4
- Use new Python packaging guidelines.
- Jinja2 version 3 does not support Python 2 anymore.
* Wed Nov 10 2021 Karolina Surma <ksurma@redhat.com> - 3.0.1-3
- Don't explicitly declare runtime dependencies when building for Python 3
- Declare jinja2+i18n extra to map the upstream package structure
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jun 22 2021 Lumír Balhar <lbalhar@redhat.com> - 3.0.1-1
- Update to 3.0.1
- Resolves: rhbz#1961862
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.11.3-3
- Rebuilt for Python 3.10
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 2.11.3-2
- Bootstrap for Python 3.10
* Sat Feb 6 2021 Thomas Moschny <thomas.moschny@gmx.de> - 2.11.3-1
- Update to 2.11.3.
- Add patches to build with Python 3.10 (#1907442).
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Dec 21 2020 Miro Hrončok <mhroncok@redhat.com> - 2.11.2-7
- Drop python2-jinja2 on Fedora 34+
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 2.11.2-5
- Rebuilt for Python 3.9
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.11.2-4
- Bootstrap for Python 3.9
* Fri May 22 2020 Thomas Moschny <thomas.moschny@gmx.de> - 2.11.2-3
- Re-add python2 subpackage (#1832057).
* Wed May 6 2020 Thomas Moschny <thomas.moschny@gmx.de> - 2.11.2-2
- Drop python2 subpackage from F33 on (#1832057).
* Wed Apr 15 2020 Thomas Moschny <thomas.moschny@gmx.de> - 2.11.2-1
- Re-add dependency on python-setuptools.

View file

@ -1 +1 @@
SHA512 (Jinja2-2.11.2.tar.gz) = baf62118702a7e113e6a22d9af58a5fa66af8017ded08f18705107a4cb93c9727c7fa118436aadfe0729d7f496241ca7bcce27863c5b19deaee3852eda68c082
SHA512 (jinja2-3.1.6.tar.gz) = bddd5e142f1462426c57b2efafdfafdfc6b66de257668707940896feae71eabdf19e0b6e34ef49b965153baf9b1eb59bb5a97349bb287ea0921dd2a751e967ab

7
tests/smoke.fmf Normal file
View file

@ -0,0 +1,7 @@
description: |
Runs very simple jinja2 template which should always work
test: python3 smoke.py
framework: shell
require:
- python3
- python3-jinja2

9
tests/smoke.py Normal file
View file

@ -0,0 +1,9 @@
import jinja2
TEMPLATE = "Text {{ variable }}"
environment = jinja2.Environment()
template = environment.from_string(TEMPLATE)
output = template.render(variable="demo")
assert output == "Text demo", f"got: {output}"