python-greenlet/python-greenlet.spec
Dirk Mueller 0031e4d6b3 - update to 1.1.2:
- Fix a potential crash due to a reference counting error when Python
    subclasses of ``greenlet.greenlet`` were deallocated. The crash
    became more common on Python 3.10; on earlier versions, silent
    memory corruption could result.
  - Fix a leak of a list object when the last reference to a greenlet
    was deleted from some other thread than the one to which it
    belonged. For this to work correctly, you must call a greenlet API
    like ``getcurrent()`` before the thread owning the greenlet exits:
    this is a long-standing limitation that can also lead to the leak of
    a thread's main greenlet if not called; we hope to lift this
    limitation. Note that in some cases this may also fix leaks of
    greenlet objects themselves. See `issue 251
  - Python 3.10: Tracing or profiling into a spawned greenlet didn't
    work as expected. See `issue 256

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-greenlet?expand=0&rev=59
2021-10-16 19:08:50 +00:00

83 lines
2.6 KiB
RPMSpec

#
# spec file for package python-greenlet
#
# Copyright (c) 2021 SUSE LLC
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-greenlet
Version: 1.1.2
Release: 0
Summary: Lightweight in-process concurrent programming
License: MIT
Group: Development/Libraries/Python
URL: https://github.com/python-greenlet/greenlet
Source0: https://files.pythonhosted.org/packages/source/g/greenlet/greenlet-%{version}.tar.gz
Source9: python-greenlet-rpmlintrc
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: c++_compiler
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-Sphinx
%python_subpackages
%description
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.
%prep
%setup -q -n greenlet-%{version}
%build
export CFLAGS="%{optflags} -fno-tree-dominator-opts -fno-strict-aliasing"
%python_build
export PYTHONPATH=$PWD/src
cd docs && make html && rm _build/html/.buildinfo
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
export CFLAGS="%{optflags} -fno-tree-dominator-opts -fno-strict-aliasing"
%pyunittest_arch discover -v greenlet.tests
%files %{python_files}
%doc AUTHORS CHANGES.rst README.rst
%doc docs/_build/html/
%license LICENSE*
%{python_sitearch}/greenlet*
%files %{python_files devel}
%doc AUTHORS
%license LICENSE*
%{_includedir}/python%{python_version}*/greenlet/
%changelog