2011-07-20 20:33:49 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-Jinja2
|
|
|
|
#
|
2015-05-12 21:28:04 +00:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-07-20 20:33:49 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2011-07-21 11:18:40 +00:00
|
|
|
|
2011-07-20 20:33:49 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-07-21 11:18:40 +00:00
|
|
|
|
2011-07-20 20:33:49 +00:00
|
|
|
Name: python-Jinja2
|
2017-03-21 16:07:46 +00:00
|
|
|
Version: 2.9.5
|
2011-09-22 09:14:51 +00:00
|
|
|
Release: 0
|
2011-07-20 20:33:49 +00:00
|
|
|
Summary: A fast and easy to use template engine written in pure Python
|
2011-09-22 09:14:51 +00:00
|
|
|
License: BSD-3-Clause
|
2011-07-20 20:33:49 +00:00
|
|
|
Group: Development/Languages/Python
|
2012-02-23 13:44:43 +00:00
|
|
|
Url: http://jinja.pocoo.org/
|
2017-03-21 16:07:46 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
|
2012-02-23 13:44:43 +00:00
|
|
|
BuildRequires: fdupes
|
2014-08-15 12:37:44 +00:00
|
|
|
BuildRequires: python-MarkupSafe
|
2011-07-20 20:33:49 +00:00
|
|
|
BuildRequires: python-devel
|
2013-10-24 11:07:21 +00:00
|
|
|
BuildRequires: python-setuptools
|
2011-07-20 20:33:49 +00:00
|
|
|
Provides: python-jinja2 = %{version}
|
2011-09-20 12:59:48 +00:00
|
|
|
Obsoletes: python-jinja2 < %{version}
|
2014-08-15 12:37:44 +00:00
|
|
|
Requires: python-MarkupSafe
|
2012-02-23 13:44:43 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
2011-07-20 20:33:49 +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. 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 %}
|
|
|
|
|
2011-09-22 12:02:16 +00:00
|
|
|
%package vim
|
|
|
|
Summary: Jinja2 syntax files for Vim
|
2012-02-23 13:44:43 +00:00
|
|
|
License: BSD-3-Clause
|
2011-09-22 12:02:16 +00:00
|
|
|
Group: Productivity/Text/Editors
|
|
|
|
Requires: %{name} = %{version}
|
2013-09-02 08:33:04 +00:00
|
|
|
%if 0%{?suse_version} >= 1010
|
2012-04-25 08:26:10 +00:00
|
|
|
Recommends: vim
|
2013-09-02 08:33:04 +00:00
|
|
|
%endif
|
2011-09-22 12:02:16 +00:00
|
|
|
|
|
|
|
%description vim
|
|
|
|
Vim syntax highlighting scheme for Jinja2 templates.
|
|
|
|
|
|
|
|
%package emacs
|
|
|
|
Summary: Jinja2 syntax files for Emacs
|
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Text/Editors
|
|
|
|
Requires: %{name} = %{version}
|
2013-09-02 08:33:04 +00:00
|
|
|
%if 0%{?suse_version} >= 1010
|
2012-04-25 08:26:10 +00:00
|
|
|
Recommends: emacs
|
2013-09-02 08:33:04 +00:00
|
|
|
%endif
|
2011-09-22 12:02:16 +00:00
|
|
|
|
|
|
|
%description emacs
|
|
|
|
Emacs syntax highlighting scheme for Jinja2 templates.
|
|
|
|
|
2011-07-20 20:33:49 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n Jinja2-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
sed -i 's/\r$//' LICENSE # Fix wrong EOL encoding
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2011-09-22 12:02:16 +00:00
|
|
|
install -Dm644 ext/Vim/jinja.vim %{buildroot}%{_datadir}/vim/site/syntax/jinja.vim # Install VIM syntax file
|
|
|
|
install -Dm644 ext/jinja.el %{buildroot}%{_datadir}/emacs/site-lisp/jinja.el # Install Emacs syntax file
|
2012-04-25 08:26:10 +00:00
|
|
|
%if 0%{?suse_version}
|
2011-07-20 20:33:49 +00:00
|
|
|
%fdupes %{buildroot}%{_prefix}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2013-07-11 15:03:07 +00:00
|
|
|
%doc AUTHORS CHANGES LICENSE artwork examples
|
2014-05-09 08:03:23 +00:00
|
|
|
%{python_sitelib}/jinja2
|
2015-07-22 14:50:36 +00:00
|
|
|
%{python_sitelib}/Jinja2-%{version}-py%{python_version}.egg-info
|
2011-07-20 20:33:49 +00:00
|
|
|
|
2011-09-22 12:02:16 +00:00
|
|
|
%files vim
|
|
|
|
%defattr(-,root,root,-)
|
2014-04-28 09:04:18 +00:00
|
|
|
%dir %{_datadir}/vim
|
|
|
|
%dir %{_datadir}/vim/site
|
|
|
|
%dir %{_datadir}/vim/site/syntax
|
2012-04-25 08:26:10 +00:00
|
|
|
%{_datadir}/vim/site/syntax/jinja.vim
|
2011-09-22 12:02:16 +00:00
|
|
|
|
|
|
|
%files emacs
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_datadir}/emacs/site-lisp/jinja.el
|
|
|
|
|
2011-07-20 20:33:49 +00:00
|
|
|
%changelog
|