File python-pyramid_chameleon.spec of Package python-pyramid_chameleon
#
# spec file for package python-pyramid_chameleon
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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_chameleon
Version: 0.3
Release: 0
Summary: Pyramid Chameleon integration
License: BSD-4-Clause AND ZPL-2.1 AND MIT
Group: Development/Languages/Python
URL: https://github.com/Pylons/pyramid_chameleon
Source: https://files.pythonhosted.org/packages/source/p/pyramid_chameleon/pyramid_chameleon-%{version}.tar.gz
Source1: fetch-intersphinx-files.sh
Source2: pyramid.inv
Patch0: fix-test___call__spec_alreadyregistered.patch
Patch1: fix-gitub_url-theme-option.patch
BuildRequires: %{python_module Chameleon}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module hupper}
# test requirements
BuildRequires: %{python_module nose}
BuildRequires: %{python_module plaster-pastedeploy}
BuildRequires: %{python_module plaster}
BuildRequires: %{python_module pyramid} >= 1.4
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module virtualenv}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# doc build requirements
BuildRequires: python3-Sphinx
BuildRequires: python3-docutils
BuildRequires: python3-pylons-sphinx-themes
BuildRequires: python3-repoze.sphinx.autointerface
Requires: python-Chameleon
Requires: python-pyramid
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
These are bindings for the `Chameleon templating system
<http://pagetemplates.org/>`_ for the Pyramid_ web framework. See
http://docs.pylonsproject.org/projects/pyramid_chameleon/en/latest/ for
documentation.
.. _Pyramid: http://pylonsproject.org/
%package -n %{name}-doc
Summary: Documentation for Pyramid Chameleon integration
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description -n %{name}-doc
This package contains documentation files for %{name}.
%prep
%setup -q -n pyramid_chameleon-%{version}
%patch0 -p1
%patch1 -p1
# patch in local intersphinx file
sed -i "s|'\(.*\)', None|'\1', 'pyramid.inv'|g" docs/conf.py
cp %SOURCE2 docs/
%build
%python_build nosetests --with-coverage
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%check
%python_exec setup.py test
%files %python_files
%defattr(-,root,root,-)
%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320
%license LICENSE.txt
%else
%doc LICENSE.txt
%endif
%defattr(-,root,root,-)
%doc CHANGES.txt README.rst
%{python_sitelib}/*
%files -n %{name}-doc
%defattr(-,root,root,-)
%doc build/sphinx/html
%changelog