File python-greenlet.spec of Package python-greenlet

# spec file for package python-greenlet
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2010 B1 Systems GmbH, Vohburg, 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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name:           python-greenlet
Version:        0.4.13
Release:        0
Summary:        Lightweight in-process concurrent programming
License:        MIT
Group:          Development/Libraries/Python
Patch0:         greenlet-ppc64le.patch
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  python-rpm-macros
BuildRequires:  python3-Sphinx

The greenlet package is a spin-off of Stackless, a version of CPython
that supports micro-threads called "tasklets". Tasklets run
pseudo-concurrently (typically in a single or a few OS-level threads)
and are synchronized with data exchanges on "channels".

%package devel
Summary:        C development headers for python-greenlet
Group:          Development/Libraries/Python
Requires:       %{name} = %{version}
BuildArch:      noarch

%description devel
This package contains header files required for C modules development.

%setup -q -n greenlet-%{version}
%patch0 -p1

export CFLAGS="%{optflags} -fno-tree-dominator-opts -fno-strict-aliasing"
cd doc && make html && rm _build/html/.buildinfo

%python_expand %fdupes %{buildroot}%{$python_sitearch}

%if %{with test}
export CFLAGS="%{optflags} -fno-tree-dominator-opts -fno-strict-aliasing"
%python_exec -q test

%files %{python_files}
%doc doc/_build/html/

%files %{python_files devel}

openSUSE Build Service is sponsored by