Compare commits
No commits in common. "rawhide" and "f35" have entirely different histories.
7 changed files with 126 additions and 159 deletions
|
|
@ -1 +0,0 @@
|
||||||
1
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1 @@
|
||||||
/Jinja2-*.tar.gz
|
/Jinja2-*.tar.gz
|
||||||
/jinja2-*.tar.gz
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
discover:
|
|
||||||
how: fmf
|
|
||||||
execute:
|
|
||||||
how: tmt
|
|
||||||
|
|
@ -1,27 +1,41 @@
|
||||||
%global srcname jinja2
|
%global srcname Jinja2
|
||||||
|
|
||||||
Name: python-jinja2
|
Name: python-jinja2
|
||||||
Version: 3.1.6
|
Version: 3.0.1
|
||||||
Release: 6%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: General purpose template engine
|
Summary: General purpose template engine
|
||||||
License: BSD-3-Clause
|
License: BSD
|
||||||
URL: https://palletsprojects.com/p/jinja/
|
URL: https://palletsprojects.com/p/jinja/
|
||||||
Source0: %{pypi_source %srcname}
|
Source0: %{pypi_source}
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
|
# Enable python3 build by default
|
||||||
|
%bcond_without python3
|
||||||
|
%else
|
||||||
|
%bcond_with python3
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora} > 33 || 0%{?rhel} > 7
|
||||||
|
# Disable python2 build by default
|
||||||
|
%bcond_with python2
|
||||||
|
%else
|
||||||
|
%bcond_without python2
|
||||||
|
%endif
|
||||||
|
|
||||||
# Enable building without docs to avoid a circular dependency between this
|
# Enable building without docs to avoid a circular dependency between this
|
||||||
# and python-sphinx:
|
# and python-sphinx:
|
||||||
%if 0%{?rhel} || 0%{?flatpak}
|
|
||||||
%bcond_with docs
|
|
||||||
%else
|
|
||||||
%bcond_without docs
|
%bcond_without docs
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
|
%bcond_without async
|
||||||
|
%else
|
||||||
|
%bcond_with async
|
||||||
%endif
|
%endif
|
||||||
# The dependency on trio is undesired on RHEL
|
|
||||||
%bcond asyncio_tests %{undefined rhel}
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%global _description %{expand:
|
%description
|
||||||
Jinja2 is a template engine written in pure Python. It provides a
|
Jinja2 is a template engine written in pure Python. It provides a
|
||||||
Django inspired non-XML syntax but supports inline expressions and an
|
Django inspired non-XML syntax but supports inline expressions and an
|
||||||
optional sandboxed environment.
|
optional sandboxed environment.
|
||||||
|
|
||||||
|
|
@ -29,167 +43,142 @@ 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
|
as Smarty or Django, you should feel right at home with Jinja2. It's
|
||||||
both designer and developer friendly by sticking to Python's
|
both designer and developer friendly by sticking to Python's
|
||||||
principles and adding functionality useful for templating
|
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
|
%package -n python3-jinja2
|
||||||
Summary: %{summary}
|
Summary: General purpose template engine for python3
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-babel >= 0.8
|
||||||
|
BuildRequires: python3-markupsafe >= 0.23
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
%if %{with asyncio_tests}
|
|
||||||
BuildRequires: python3-trio
|
|
||||||
%endif
|
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
BuildRequires: %{_bindir}/sphinx-build-3
|
BuildRequires: %{_bindir}/sphinx-build-3
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: python3-Pallets-Sphinx-Themes >= 2
|
BuildRequires: python3-Pallets-Sphinx-Themes
|
||||||
BuildRequires: python3-sphinxcontrib-log-cabinet
|
BuildRequires: python3-sphinxcontrib-log-cabinet
|
||||||
BuildRequires: python3-sphinx-issues
|
BuildRequires: python3-sphinx-issues
|
||||||
%endif
|
%endif
|
||||||
|
Requires: python3-babel >= 0.8
|
||||||
|
Requires: python3-markupsafe >= 0.23
|
||||||
|
Requires: python3-setuptools
|
||||||
|
%{?python_provide:%python_provide python3-jinja2}
|
||||||
|
|
||||||
%description -n python3-jinja2 %_description
|
%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.
|
||||||
|
|
||||||
%pyproject_extras_subpkg -n python3-jinja2 i18n
|
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
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n %{srcname}-%{version}
|
%autosetup -p1 -n %{srcname}-%{version}
|
||||||
|
|
||||||
|
# cleanup
|
||||||
%generate_buildrequires
|
find . -name '*.pyo' -o -name '*.pyc' -delete
|
||||||
%pyproject_buildrequires -x i18n
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%if %{with python2}
|
||||||
|
%py2_build
|
||||||
|
%endif # with python2
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%py3_build
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
make -C docs html PYTHONPATH=$(pwd)/src SPHINXBUILD=sphinx-build-3
|
make -C docs html PYTHONPATH=$(pwd)/src SPHINXBUILD=sphinx-build-3
|
||||||
# remove hidden file
|
# remove hidden file
|
||||||
rm -rvf docs/_build/html/.buildinfo
|
rm -rf docs/_build/html/.buildinfo
|
||||||
%endif
|
%endif # with docs
|
||||||
|
%endif # with python3
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%if %{with python2}
|
||||||
%pyproject_save_files jinja2
|
%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
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# test_elif_deep is flaky for an unknown reason
|
%if %{with python3}
|
||||||
# https://github.com/pallets/jinja/issues/2079
|
PYTHONPATH=$(pwd)/src %{__python3} -m pytest tests
|
||||||
%pytest tests -k "not test_elif_deep" %{!?with_asyncio_tests:--ignore tests/test_async.py --ignore tests/test_async_filters.py}
|
%endif # with python3
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-jinja2 -f %{pyproject_files}
|
%if %{with python2}
|
||||||
%doc README.md
|
%files -n python2-jinja2
|
||||||
%doc docs/examples
|
%doc CHANGES.rst
|
||||||
%license LICENSE.txt
|
%doc ext
|
||||||
|
%doc examples
|
||||||
|
%license LICENSE.rst
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
%doc docs/_build/html
|
%doc docs/_build/html
|
||||||
%endif
|
%endif
|
||||||
|
%{python2_sitelib}/jinja2/
|
||||||
|
%{python2_sitelib}/Jinja2-*.egg-info/
|
||||||
|
%endif # with python2
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%files -n python3-jinja2
|
||||||
|
%doc CHANGES.rst
|
||||||
|
%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
|
%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
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (jinja2-3.1.6.tar.gz) = bddd5e142f1462426c57b2efafdfafdfc6b66de257668707940896feae71eabdf19e0b6e34ef49b965153baf9b1eb59bb5a97349bb287ea0921dd2a751e967ab
|
SHA512 (Jinja2-3.0.1.tar.gz) = 18ca56fb2271885c41982d2a3b2daa8bdc7a95191f54d8eec96ddbe001ac995b3fae766b603d8c9287413e5227062b771575012cd92a3f64ed76067d5f168701
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
description: |
|
|
||||||
Runs very simple jinja2 template which should always work
|
|
||||||
test: python3 smoke.py
|
|
||||||
framework: shell
|
|
||||||
require:
|
|
||||||
- python3
|
|
||||||
- python3-jinja2
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
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}"
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue