File python-pyramid_jinja2.spec of Package python-pyramid_jinja2
#
# spec file for package python-pyramid_jinja2
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyramid_jinja2
Version: 2.7
Release: 0
Summary: Jinja2 template bindings for the Pyramid web framework
#License: BSD-4-Clause AND ZPL-2.1 AND MIT
License: SUSE-Repoze
Group: Development/Languages/Python
Url: http://docs.pylonsproject.org
Source: https://files.pythonhosted.org/packages/source/p/pyramid_jinja2/pyramid_jinja2-%{version}.tar.gz
Source1: fetch-intersphinx-files.sh
Source2: pyramid.inv
Source3: pyramid_zcml.inv
Source4: jinja2.inv
Patch0: pyramid_jinja2-local-intersphinx-files.patch
BuildRequires: %{python_module Jinja2} >= 2.5.0
BuildRequires: %{python_module MarkupSafe}
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module WebTest}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module hupper}
BuildRequires: %{python_module nose} >= 1.2.0
BuildRequires: %{python_module plaster-pastedeploy}
BuildRequires: %{python_module plaster}
BuildRequires: %{python_module pylons-sphinx-themes}
BuildRequires: %{python_module pyramid} >= 1.3.0
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module zope.deprecation}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
%if %{have_python2}
BuildRequires: python2-typing
%endif
%if %{have_python3} && %{python3_version_nodots} < 35
BuildRequires: python3-typing
%endif
Requires: python-Jinja2 >= 2.5.0
Requires: python-pyramid >= 1.0.2
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
These are bindings for the Jinja2 templating system for the Pyramid web
framework.
See http://docs.pylonsproject.org/projects/pyramid_jinja2/dev/ for
documentation or the -doc package.
%package doc
Summary: Jinja2 template bindings for the Pyramid web framework
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q -n pyramid_jinja2-%{version}
%patch0 -p1
cp %SOURCE2 %SOURCE3 %SOURCE4 docs/
# Remove any precompiled source files
find . -iname "*.pyc" -delete
%build
%python_build
%python_exec setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%check
# At 2017-07-28
# Coverage failed on pyramid_jinja2/compat.py 28 10 64%%
#%%python_exec setup.py nosetests --with-coverage
%python_exec setup.py nosetests
%files %{python_files}
%defattr(-,root,root,-)
%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320
%license LICENSE.txt
%else
%doc LICENSE.txt
%endif
%doc CHANGES.txt CONTRIBUTORS.txt COPYRIGHT.txt README.rst
%{python_sitelib}/*
%files %{python_files doc}
%defattr(-,root,root,-)
%doc build/sphinx/html
%changelog