File python-billiard.spec of Package python-billiard

#
# spec file for package python-billiard
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, 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-billiard
Version:        3.5.0.2
Release:        0
Url:            https://github.com/celery/billiard
Summary:        Python multiprocessing fork
License:        BSD-3-Clause
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/b/billiard/billiard-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
# Documentation requirements (only python3 needed):
BuildRequires:  python3-Sphinx >= 0.5
# Test requirements:
BuildRequires:  %{python_module case >= 1.3.1}
BuildRequires:  %{python_module pytest >= 3.0}
Suggests:       %name-doc = %version
%ifpython3
BuildArch:      noarch
%endif

%package -n %{name}-doc
Summary:        Documentation for %name
Group:          Development/Languages/Python
Provides:       %{python_module billiard-doc = %{version}}
BuildArch:      noarch

%python_subpackages

%description
billiard is a fork of the Python 2.7 multiprocessing package. The
multiprocessing package itself is a renamed and updated version of R Oudkerk's
pyprocessing package. This standalone variant is intended to be compatible with
Python 2.4 and 2.5, and will draw it's fixes/improvements from python-trunk.

%description -n %{name}-doc
Documentation and help files for %name.

%prep
%setup -q -n billiard-%{version}

%build
%python_build
pushd Doc
sphinx-build -b html . html
rm -r html/.buildinfo html/.doctrees
popd

%install
%python_install
%fdupes %buildroot/%_prefix

%check
%python_exec setup.py test

%files  %{python_files}
%defattr(-,root,root,-)
%doc CHANGES.txt README.rst
%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320
%license LICENSE.txt
%else
%doc LICENSE.txt
%endif
%ifpython2
%{python_sitearch}/*
%else
%{python_sitelib}/*
%endif

%files -n %{name}-doc
%doc Doc/html

%changelog
openSUSE Build Service is sponsored by