Files
python-Cython/python-Cython.spec

102 lines
3.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-Cython
#
Accepting request 1058181 from devel:languages:python - update to 0.29.33: * The ``cythonize`` and ``cython`` commands have a new option ``-M`` / ``--depfile`` to generate ``.dep`` dependency files for the compilation unit. This can be used by external build tools to track these dependencies. * ``const`` fused types could not be used with memory views. * ``wstr`` usage was removed in Python 3.12 and later (PEP-623). * A type check assertion for Cython functions failed in debug Python builds. * Fixed various compiler warnings. * Fixed error when calculating complex powers of negative numbers. * Corrected a small mis-formatting of exception messages on Python 2. * The ``PyUnicode_AsUTF8AndSize()`` C-API function was missing from the CPython declarations. * A performance problem in the compiler was resolved when nesting conditional expressions. * Test suite problems with recent NumPy and CPython versions were resolved. * Other changes * The undocumented, untested and apparently useless syntax ``from somemodule cimport class/struct/union somename`` was deprecated in anticipation of its removal in Cython 3. The type modifier is not needed here and a plain ``cimport`` of the name will do. * Properly disable generation of descriptor docstrings on PyPy since they cause crashes. It was previously disabled, but only accidentally via a typo. * The ``cpow`` directive of Cython 3.0 is available as a no-op. OBS-URL: https://build.opensuse.org/request/show/1058181 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Cython?expand=0&rev=68
2023-01-14 19:31:22 +00:00
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
%bcond_with test
%{?sle15_python_module_pythons}
Name: python-Cython
Accepting request 1118531 from devel:languages:python - update to version 3.0.4: * Features added - A new compiler directive show_performance_hints was added to disable the newly added performance hint output. (Github issue :issue:`5748`) * Bugs fixed - `cythonize` required ``distutils even for operations that did not build binaries. (Github issue :issue:`5751`) - A regression in 3.0.3 was fixed that prevented calling inline functions from another inline function in .pxd files. (Github issue :issue:`5748`) - Some C compiler warnings were resolved. Patch by Pierre Jolivet. (Github issue :issue:`5756`) - update to version 3.0.3: * Features added - More warnings were added to help users migrate and avoid bugs. (Github issue #5650) - A warning-like category for performance hints was added that bypasses -Werror. (Github issue #5673) - FastGIL now uses standard thread_local in C++. (Github issue #5640) - reference_wrapper was added to libcpp.functional. Patch by Vyas Ramasubramani. (Github issue #5671) - The cythonize command now supports the --cplus option known from the cython command. (Github issue #5736) * Bug fixed - Performance regressions where the GIL was needlessly acquired were fixed. (Github issues #5670, #5700) - A reference leak for exceptions in Python 3.12 was resolved. Patch by Eric Johnson. (Github issue #5724) - fastcall calls with keyword arguments generated incorrect C code. (Github issue #5665) - Assigning the type converted result of a conditional (if-else) expression to int or bool variables could lead to incorrect C code. (Github issue #5731) - Early (unlikely) failures in Python function wrappers no longer set a traceback in order to simplify the C code flow. Being mostly memory allocation errors, they probably would never have created a traceback anyway. (Github issue #5681) - Relative cimports from packages with __init__.py files could fail. (Github issue #5715) - Several issues with the Limited API support were resolved. (Github issues #5641, #5648, #5689) - The code generated for special-casing both Cython functions and PyCFunctions was cleaned up to avoid calling C-API functions that were not meant for the other type respectively. This could previously trigger assertions in CPython debug builds and now also plays better with the Limited API. (Github issues #4804, #5739) - Fix some C compiler warnings. Patches by Ralf Gommers, Oleksandr Pavlyk, Sebastian Koslowski et al. (Github issues #5651, #5663, #5668, #5717, #5726, #5734) - Generating gdb debugging information failed when using generator expressions. Patch by Oleksandr Pavlyk. (Github issue #5552) - Passing a setuptools.Extension into cythonize() instead of a distutils.Extension could make it miss the matching extensions. - cython -M needlessly required distutils, which made it fail in Python 3.12. (Github issue #5681) * Other changes - The visible deprecation warning for DEF was removed again since it proved difficult for some users to migrate away from it. The statement is still meant to be removed at some point (and thus, like IF, should not be used in new code), but the time for sunset is probably not around the corner. (Github issue #4310) - The np_pythran option raise a DeprecationWarning if it receives other values than True and False. This will eventually be disallowed (in line with all other boolean options). OBS-URL: https://build.opensuse.org/request/show/1118531 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Cython?expand=0&rev=75
2023-10-19 20:47:18 +00:00
Version: 3.0.4
Release: 0
Summary: The Cython compiler for writing C extensions for the Python language
License: Apache-2.0
URL: https://cython.org/
# SourceRepository: https://github.com/cython/cython
Source: https://files.pythonhosted.org/packages/source/C/Cython/Cython-%{version}.tar.gz
Source1: python-Cython-rpmlintrc
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: python-rpm-macros
Requires: python-devel
Requires(post): update-alternatives
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}
%python_subpackages
%description
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.
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
%setup -q -n Cython-%{version}
# Fix non-executable scripts
sed -i "s|^#!.*||" Cython/Debugger/{libpython,Cygdb}.py cython.py
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%pyproject_wheel
%install
%pyproject_install
for p in cython cythonize cygdb ; do
%python_clone -a %{buildroot}%{_bindir}/$p
done
%{python_expand chmod a+x %{buildroot}%{$python_sitearch}/Cython/Build/Cythonize.py
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitearch}/Cython/Build/Cythonize.py
$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}
}
%check
%if %{with test}
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1
$python runtests.py -v
}
%endif
%post
%python_install_alternative cython cythonize cygdb
%postun
%python_uninstall_alternative cython
%files %{python_files}
%license LICENSE.txt COPYING.txt
Accepting request 588610 from devel:languages:python - Version update to 0.28.1: * PyFrozenSet_New() was accidentally used in PyPy where it is lacking from the C-API. * Assignment between some C++ templated types were incorrectly rejected when the templates mix const with ctypedef. (Github issue #2148) * Undeclared C++ no-args constructors in subclasses could make the compilation fail if the base class constructor was declared without nogil. (Github issue #2157) * Bytes %-formatting inferred basestring (bytes or unicode) as result type in some cases where bytes would have been safe to infer. (Github issue #2153) * None was accidentally disallowed as typed return value of dict.pop(). - update to version 0.28: * Features added + Cdef classes can now multiply inherit from ordinary Python classes. (The primary base must still be a c class, possibly object, and the other bases must not be cdef classes.) + Type inference is now supported for Pythran compiled NumPy expressions. Patch by Nils Braun. (Github issue #1954) + The const modifier can be applied to memoryview declarations to allow read-only buffers as input. (Github issues #1605, #1869) + C code in the docstring of a cdef extern block is copied verbatimly into the generated file. Patch by Jeroen Demeyer. (Github issue #1915) + When compiling with gcc, the module init function is now tuned for small code size instead of whatever compile flags were provided externally. Cython now also disables some code intensive optimisations in that function to further reduce the code size. (Github issue #2102) + Decorating an async coroutine with @cython.iterable_coroutine OBS-URL: https://build.opensuse.org/request/show/588610 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Cython?expand=0&rev=36
2018-03-22 10:56:09 +00:00
%doc README.rst ToDo.txt USAGE.txt
%python_alternative %{_bindir}/cygdb
%python_alternative %{_bindir}/cython
%python_alternative %{_bindir}/cythonize
%{python_sitearch}/Cython/
%{python_sitearch}/Cython-%{version}.dist-info
%{python_sitearch}/cython.py*
%pycache_only %{python_sitearch}/__pycache__/cython*.py*
%{python_sitearch}/pyximport/
%changelog