2011-09-02 09:55:13 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-Cython
|
|
|
|
|
#
|
2023-01-14 19:31:22 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2011-09-02 09:55:13 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
2011-09-05 14:38:13 +00:00
|
|
|
|
2019-02-04 20:22:05 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-02 09:55:13 +00:00
|
|
|
#
|
|
|
|
|
|
2018-02-03 14:36:57 +00:00
|
|
|
|
2023-07-12 15:26:05 +00:00
|
|
|
%bcond_with test
|
2023-08-18 17:27:27 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2012-11-28 13:32:53 +00:00
|
|
|
Name: python-Cython
|
2023-11-13 21:16:18 +00:00
|
|
|
Version: 3.0.5
|
2011-09-22 08:48:07 +00:00
|
|
|
Release: 0
|
2011-09-02 09:55:13 +00:00
|
|
|
Summary: The Cython compiler for writing C extensions for the Python language
|
|
|
|
|
License: Apache-2.0
|
2022-03-23 19:15:19 +00:00
|
|
|
URL: https://cython.org/
|
2023-08-18 17:27:27 +00:00
|
|
|
# SourceRepository: https://github.com/cython/cython
|
2016-11-01 08:49:53 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/C/Cython/Cython-%{version}.tar.gz
|
2014-08-05 11:00:01 +00:00
|
|
|
Source1: python-Cython-rpmlintrc
|
2017-03-17 14:04:53 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2023-07-12 15:26:05 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
|
BuildRequires: %{python_module wheel}
|
2012-05-29 09:37:16 +00:00
|
|
|
BuildRequires: fdupes
|
2015-01-10 22:07:06 +00:00
|
|
|
BuildRequires: gcc-c++
|
2017-03-17 14:04:53 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2015-08-21 06:24:51 +00:00
|
|
|
Requires: python-devel
|
2013-10-17 12:31:03 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-04-24 21:06:35 +00:00
|
|
|
Requires(postun):update-alternatives
|
Accepting request 1107857 from devel:languages:python
- update to version 3.0.2:
* Bugs fixed
+ Using None as default value for arguments annotated as int could
crash Cython. (Github issue :issue:`5643`)
+ Default values of fused types that include complex could
generate invalid C code with -DCYTHON_CCOMPLEX=0. (Github issue
:issue:`5644`)
+ Using C++ enum class types in extension type method signatures
could generate invalid C code. (Github issue :issue:`5637`)
- changes from version 3.0.1:
* Features added
+ The error messages regarding exception declarations were
improved in order to give better help about possible reasons and
fixes. (Github issue :issue:`5547`)
* Bugs fixed
+ Memory view types in Python argument annotations no longer
accept None. They now require an explicit Optional[] or a None
default value in order to allow None to be passed. This was an
oversight in the 3.0.0 release and is a BACKWARDS INCOMPATIBLE
change. However, since it only applies to code using Python
syntax, it probably only applies to newly written code that was
written for Cython 3.0 and can easily be adapted. In most cases,
we expect that this change will avoid bugs in user code rather
than produce problems. (Github issue :issue:`5612`)
+ nogil functions using parallel code could freeze when called
with the GIL held. (Github issues :issue:`5564`, :issue:`5573`)
+ Relative cimports could end up searching globally and find the
same package installed elsewhere, potentially in another
version. (Github issue :issue:`5511`)
+ Attribute lookups on known standard library modules could
accidentally search in the module namespace instead. (Github
issue :issue:`5536`)
+ Using constructed C++ default arguments could generate invalid
C++ code. (Github issue :issue:`5553`)
+ libcpp.memory.make_unique() was lacking C++ exception
handling. (Github issue :issue:`5560`)
+ Some non-public and deprecated CAPI usages were replaced by
public (and thus more future proof) API code.
+ Many issues with the Limited API support were resolved. Patches
by Lisandro Dalcin et al. (Github issues :issue:`5549`,
:issue:`5550`, :issue:`5556`, :issue:`5605`, :issue:`5617`)
+ Some C compiler warnings were resolved. Patches by Matti Picus
et al. (Github issues :issue:`5557`, :issue:`5555`)
+ Large Python integers are now stored in hex instead of decimal
strings to work around security limits in Python and generally
speed up their Python object creation.
+ NULL could not be used as default for fused type pointer
arguments. (Github issue :issue:`5554`)
+ C functions that return pointer types now return NULL as default
exception value. Previously, calling code wasn't aware of this
and always tested for raised exceptions. (Github issue
:issue:`5554`)
+ Untyped literal default arguments in fused functions could
generate invalid C code. (Github issue :issue:`5614`)
+ C variables declared as const could generate invalid C code when
used in closures, generator expressions, ctuples, etc. (Github
issues :issue:`5558`, :issue:`5333`)
+ Enums could not refer to previously defined enums in their
definition. (Github issue :issue:`5602`)
+ The Python conversion code for anonymous C enums conflicted with
regular int conversion. (Github issue :issue:`5623`)
+ Using memory views for property methods (and other special
methods) could lead to refcounting problems. (Github issue
:issue:`5571`)
+ Star-imports could generate code that tried to assign to
constant C macros like PY_SSIZE_T_MAX and PY_SSIZE_T_MIN. Patch
by Philipp Wagner. (Github issue :issue:`5562`)
+ CYTHON_USE_TYPE_SPECS can now be (explicitly) enabled in PyPy.
+ The template parameter "delimeters" in the Tempita Template
class was corrected to "delimiters". The old spelling is still
available in the main template API but now issues a
DeprecationWarning. (Github issue :issue:`5608`)
+ The cython --version output is now less likely to reach both
stdout and stderr. Patch by Eli Schwartz. (Github issue
:issue:`5504`)
+ The sdist was missing the Shadow.pyi stub file.
OBS-URL: https://build.opensuse.org/request/show/1107857
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Cython?expand=0&rev=74
2023-08-30 08:18:07 +00:00
|
|
|
Conflicts: python-Cython < 3
|
|
|
|
|
Provides: python-Cython3 = %{version}
|
|
|
|
|
Obsoletes: python-Cython3 <= %{version}
|
2017-03-17 14:04:53 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
2011-09-02 09:55:13 +00:00
|
|
|
%description
|
2017-10-05 09:49:21 +00:00
|
|
|
The Cython language allows for writing C extensions for the Python
|
|
|
|
|
language. Cython is a source code translator based on Pyrex, but
|
|
|
|
|
supports more cutting edge functionality and optimizations.
|
2011-09-02 09:55:13 +00:00
|
|
|
|
|
|
|
|
The Cython language is very close to the Python language (and most Python
|
|
|
|
|
code is also valid Cython code), but Cython additionally supports calling C
|
|
|
|
|
functions and declaring C types on variables and class attributes. This
|
|
|
|
|
allows the compiler to generate very efficient C code from Cython code.
|
|
|
|
|
|
|
|
|
|
%prep
|
2012-11-28 13:32:53 +00:00
|
|
|
%setup -q -n Cython-%{version}
|
2015-08-06 22:20:33 +00:00
|
|
|
# Fix non-executable scripts
|
|
|
|
|
sed -i "s|^#!.*||" Cython/Debugger/{libpython,Cygdb}.py cython.py
|
2011-09-02 09:55:13 +00:00
|
|
|
|
|
|
|
|
%build
|
2018-02-25 11:20:57 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
2023-07-12 15:26:05 +00:00
|
|
|
%pyproject_wheel
|
2011-09-02 09:55:13 +00:00
|
|
|
|
|
|
|
|
%install
|
2023-07-12 15:26:05 +00:00
|
|
|
%pyproject_install
|
2015-08-06 22:20:33 +00:00
|
|
|
for p in cython cythonize cygdb ; do
|
2022-10-27 11:52:16 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/$p
|
2015-08-06 22:20:33 +00:00
|
|
|
done
|
2015-01-10 22:07:06 +00:00
|
|
|
|
2017-10-13 12:07:01 +00:00
|
|
|
%{python_expand chmod a+x %{buildroot}%{$python_sitearch}/Cython/Build/Cythonize.py
|
2018-02-25 11:20:57 +00:00
|
|
|
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitearch}/Cython/Build/Cythonize.py
|
2017-10-13 12:07:01 +00:00
|
|
|
$python -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/Cython/Build/
|
|
|
|
|
$python -O -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/Cython/Build/
|
|
|
|
|
%fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
|
}
|
2013-10-17 12:31:03 +00:00
|
|
|
|
2022-02-03 22:16:15 +00:00
|
|
|
%check
|
|
|
|
|
%if %{with test}
|
|
|
|
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1
|
|
|
|
|
$python runtests.py -v
|
|
|
|
|
}
|
|
|
|
|
%endif
|
|
|
|
|
|
2013-10-17 12:31:03 +00:00
|
|
|
%post
|
2017-03-17 14:04:53 +00:00
|
|
|
%python_install_alternative cython cythonize cygdb
|
2013-10-17 12:31:03 +00:00
|
|
|
|
2015-08-06 22:20:33 +00:00
|
|
|
%postun
|
2017-03-17 14:04:53 +00:00
|
|
|
%python_uninstall_alternative cython
|
2013-10-17 12:31:03 +00:00
|
|
|
|
2017-03-17 14:04:53 +00:00
|
|
|
%files %{python_files}
|
2018-02-25 11:20:57 +00:00
|
|
|
%license LICENSE.txt COPYING.txt
|
2018-03-22 10:56:09 +00:00
|
|
|
%doc README.rst ToDo.txt USAGE.txt
|
2017-03-17 14:04:53 +00:00
|
|
|
%python_alternative %{_bindir}/cygdb
|
|
|
|
|
%python_alternative %{_bindir}/cython
|
|
|
|
|
%python_alternative %{_bindir}/cythonize
|
2012-11-28 13:32:53 +00:00
|
|
|
%{python_sitearch}/Cython/
|
2023-08-18 17:27:27 +00:00
|
|
|
%{python_sitearch}/Cython-%{version}.dist-info
|
2012-11-28 13:32:53 +00:00
|
|
|
%{python_sitearch}/cython.py*
|
2017-10-13 12:07:01 +00:00
|
|
|
%pycache_only %{python_sitearch}/__pycache__/cython*.py*
|
2012-05-29 09:37:16 +00:00
|
|
|
%{python_sitearch}/pyximport/
|
2011-09-02 09:55:13 +00:00
|
|
|
|
|
|
|
|
%changelog
|