15
0
forked from pool/python-Jinja2

- Update to 2.10.3:

* Fix Python 3.7 deprecation warnings.
  * Using range in the sandboxed environment uses xrange on Python 2 to avoid memory use. :issue:`933`
  * Use Python 3.7's better traceback support to avoid a core dump when using debug builds of Python 3.7. :issue:`1050`
  * Fix a typo in Babel entry point in setup.py that was preventing installation.
- Remove merged python38.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Jinja2?expand=0&rev=74
This commit is contained in:
Tomáš Chvátal
2019-10-07 13:42:06 +00:00
committed by Git OBS Bridge
parent ebf628bfa2
commit 3bb888be77
5 changed files with 22 additions and 213 deletions

View File

@@ -19,17 +19,16 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-Jinja2
Version: 2.10.1
Version: 2.10.3
Release: 0
Summary: A template engine written in pure Python
License: BSD-3-Clause
Group: Development/Languages/Python
URL: http://jinja.pocoo.org/
URL: https://github.com/pallets/jinja
Source: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
Patch0: python38.patch
BuildRequires: %{python_module MarkupSafe >= 0.23}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Babel >= 0.8
@@ -44,24 +43,13 @@ Obsoletes: %{oldpython}-jinja2 < %{version}
%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. Here a small example of a Jinja template:
{%% extends 'base.html' %%}
{%% block title %%}Memberlist{%% endblock %%}
{%% block content %%}
<ul>
{%% for user in users %%}
<li><a href="{{ user.url }}">{{ user.username }}</a></li>
{%% endfor %%}
</ul>
{%% endblock %%}
sandboxed environment.
%package -n python-Jinja2-vim
Summary: Jinja2 syntax files for Vim
License: BSD-3-Clause
Group: Productivity/Text/Editors
Requires: %{name} = %{version}
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
Recommends: vim
%endif
@@ -71,9 +59,8 @@ Vim syntax highlighting scheme for Jinja2 templates.
%package -n python-Jinja2-emacs
Summary: Jinja2 syntax files for Emacs
License: GPL-2.0-or-later
Group: Productivity/Text/Editors
Requires: %{name} = %{version}
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
Recommends: emacs
%endif
@@ -82,8 +69,7 @@ Emacs syntax highlighting scheme for Jinja2 templates.
%prep
%setup -q -n Jinja2-%{version}
%patch0 -p1
sed -i 's/\r$//' LICENSE # Fix wrong EOL encoding
dos2unix LICENSE.rst # Fix wrong EOL encoding
%build
%python_build
@@ -98,8 +84,8 @@ install -Dm644 ext/jinja.el %{buildroot}%{_datadir}/emacs/site-lisp/jinja.el # I
%pytest
%files %{python_files}
%license LICENSE
%doc AUTHORS README.rst CHANGES.rst artwork examples
%license LICENSE.rst
%doc README.rst CHANGES.rst artwork examples
%{python_sitelib}/jinja2
%{python_sitelib}/Jinja2-%{version}-py%{python_version}.egg-info