File python-pyramid_rpc.spec of Package python-pyramid_rpc

#
# spec file for package python-pyramid_rpc
#
# 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_rpc
Version:        0.8
Release:        0
Summary:        RPC support for the Pyramid web framework
License:        BSD-4-Clause and ZPL-2.1 and MIT
Group:          Development/Languages/Python
Url:            https://docs.pylonsproject.org/projects/pyramid_rpc/en/latest/
Source:         https://files.pythonhosted.org/packages/source/p/pyramid_rpc/pyramid_rpc-%{version}.tar.gz
Source1:        fetch-intersphinx-files.sh
Source2:        pyramid.inv
# Testing requirements:
BuildRequires:  %{python_module WebTest}
BuildRequires:  %{python_module coverage}
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module hupper}
BuildRequires:  %{python_module nose}
BuildRequires:  %{python_module plaster-pastedeploy}
BuildRequires:  %{python_module plaster}
BuildRequires:  %{python_module pyramid} >= 1.1
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module transaction}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
# Documentation requirements:
BuildRequires:  python3-Sphinx
BuildRequires:  python3-pylons-sphinx-themes
Requires:       python-pyramid >= 1.1
Requires:       python-transaction
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%python_subpackages

%description
pyramid_rpc is a package of RPC related add-on's to make it easier to
create RPC services.

%package -n %{name}-doc
Summary:        RPC support for the Pyramid web framework
Group:          Development/Languages/Python
Requires:       %{name} = %{version}

%description -n %{name}-doc
This package contains documentation files for %{name}.

%prep
%setup -q -n pyramid_rpc-%{version}
# patch in local intersphinx file
sed -i "s|        None|        'pyramid.inv'|" docs/conf.py
cp %SOURCE2 docs/

%build
%python_build
python3 setup.py build_sphinx && rm -f build/sphinx/html/.buildinfo

%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}

%check
%python_exec setup.py nosetests --with-coverage

%files %python_files
%defattr(-,root,root,-)
%doc CHANGES.txt CONTRIBUTORS.txt COPYRIGHT.txt README.rst TODO.txt
%{python_sitelib}/*

%files -n %{name}-doc
%defattr(-,root,root,-)
%doc build/sphinx/html

%changelog
openSUSE Build Service is sponsored by