File project.diff of Package python-pyramid_beaker
--- python-pyramid_beaker.changes.orig
+++ python-pyramid_beaker.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Sep 21 09:41:21 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net>
+
+- Create multibuild doc flavor (to combine the specs again)
+– Build doc just once (Python3 only)
+
+-------------------------------------------------------------------
Sat Sep 16 16:12:11 UTC 2017 - bruno@ioda-net.ch
- Move to single-spec
--- python-pyramid_beaker.spec.orig
+++ python-pyramid_beaker.spec
@@ -1,8 +1,8 @@
#
# spec file for package python-pyramid_beaker
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
-# Copyright (c) 2013 LISA GmbH, Bingen, Germany.
+# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2013-2020 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
@@ -17,8 +17,17 @@
#
+%global flavor @BUILD_FLAVOR@%{nil}
+
+%if "%{flavor}" == "doc"
+%define psuffix -doc
+%endif
+%if "%{flavor}" == ""
+%define psuffix %{nil}
+%endif
+
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-Name: python-pyramid_beaker
+Name: python-pyramid_beaker%{psuffix}
Version: 0.8
Release: 0
Url: http://docs.pylonsproject.org
@@ -26,6 +35,8 @@ Summary: Beaker session factory b
License: BSD-4-Clause and ZPL-2.1 and MIT
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/pyramid_beaker/pyramid_beaker-%{version}.tar.gz
+Source1: fetch-intersphinx-files.sh
+Source2: pyramid.inv
#Upstream issue #29, PR#30
Patch0: upstream-fix-test_includeme.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -37,19 +48,23 @@ BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Testing requirements:
BuildRequires: %{python_module coverage}
-BuildRequires: %{python_module hupper}
BuildRequires: %{python_module nose}
-BuildRequires: %{python_module plaster-pastedeploy}
-BuildRequires: %{python_module plaster}
-BuildRequires: python2-funcsigs
BuildRequires: python3-dbm
+# Documentation requirements:
+%if "%{flavor}" == "doc"
+BuildRequires: python3-Sphinx
+BuildRequires: python3-pylons-sphinx-themes
+BuildRequires: python3-pyramid_beaker = %{version}
+%else
+Recommends: python-pyramid_beaker = %{version}
Requires: python-Beaker
Requires: python-pyramid
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%endif
BuildArch: noarch
%python_subpackages
+%if "%{flavor}" == ""
%description
Provides a session factory for the Pyramid web framework backed by the Beaker
sessioning system.
@@ -81,4 +96,23 @@ http://docs.pylonsproject.org/
%doc CHANGES.txt CONTRIBUTORS.txt COPYRIGHT.txt PKG-INFO README.txt
%{python_sitelib}/*
+%else
+# doc flavor
+%description
+This package contains documentation files for pyramid_beaker.
+
+%prep
+%setup -q -n pyramid_beaker-%{version}
+# patch in local intersphinx file
+sed -i "s|'\(.*\)', None|'\1', 'pyramid.inv'|g" docs/conf.py
+cp %SOURCE2 docs/
+
+%build
+python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
+
+%files %python_files
+%defattr(-,root,root,-)
+%doc build/sphinx/html
+%endif
+
%changelog