Update to 3.0.0rc2

This commit is contained in:
Tomáš Hrnčiar 2023-02-23 12:18:32 +01:00 committed by Miro Hrončok
parent c6b945e9de
commit 47185aeaea
5 changed files with 17 additions and 125 deletions

5
.gitignore vendored
View File

@ -55,3 +55,8 @@ Cython-0.12.1.tar.gz
/Cython-0.29.33.tar.gz
/Cython-0.29.34.tar.gz
/Cython-0.29.35.tar.gz
/Cython-3.0.0a11.tar.gz
/Cython-3.0.0b1.tar.gz
/Cython-3.0.0b2.tar.gz
/Cython-3.0.0b3.tar.gz
/Cython-3.0.0rc2.tar.gz

View File

@ -1,30 +1,19 @@
%bcond tests 0
%bcond tests 1
# This bcond allows to ship a non-compiled version
# Slower, but sometimes necessary with alpha Python versions
%bcond cython_compile 1
# We don't ship emacs-cython-mode in EL.
%bcond emacs %{undefined rhel}
Name: Cython
Version: 0.29.35
Release: 2%{?dist}
%global general_version 3.0.0
%global prerel rc2
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 1%{?dist}
Summary: Language for writing Python extension modules
License: Apache-2.0
URL: http://www.cython.org
Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz
# Wrap the docstring of cython-default-compile-format to 80 characters
# Upstream PR: https://github.com/cython/emacs-cython-mode/pull/1
# Fixes https://bugzilla.redhat.com/2155090
Patch: emacs-docstring-wrap.patch
# Compile-time Python 3.12 compatibility for CYTHON_TRACE support
# Taken from the 3.x branch upstream.
# See: https://github.com/cython/cython/issues/5450
Patch: https://github.com/cython/cython/commit/03c498d3142ccee2da258c540e96f12c863159fc.patch?/py3.12-tracing.patch
Source: https://github.com/cython/cython/archive/%{general_version}%{?prerel:%{prerel}}/Cython-%{general_version}%{?prerel:%{prerel}}.tar.gz
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@ -84,47 +73,17 @@ Provides: bundled(python3dist(tempita))
%description -n python3-Cython %{_description}
%if %{with emacs}
%package -n emacs-cython-mode
Summary: A major mode for editing Cython source files in Emacs
BuildArch: noarch
BuildRequires: emacs
%{?_emacs_version:
Requires: emacs(bin) >= %{_emacs_version}
}
%description -n emacs-cython-mode
cython-mode is an Emacs major mode for editing Cython source files.
%endif
%prep
%autosetup -n cython-%{version} -p1
%autosetup -n cython-%{general_version}%{?prerel} -p1
%build
%py3_build -- %{!?with_cython_compile:--no-cython-compile}
%if %{with emacs}
# emacs-cython-mode build
echo ";;
(require 'cython-mode)" > cython-mode-init.el
cp -p Tools/cython-mode.el .
%{_emacs_bytecompile} *.el
%endif
%install
%py3_install -- %{!?with_cython_compile:--no-cython-compile}
%if %{with emacs}
# emacs-cython-mode install
mkdir -p %{buildroot}%{_emacs_sitelispdir}/
cp -p cython-mode.el cython-mode.elc %{buildroot}%{_emacs_sitelispdir}/
mkdir -p %{buildroot}%{_emacs_sitestartdir}/
cp -p cython-mode-init.el cython-mode-init.elc %{buildroot}%{_emacs_sitestartdir}/
%endif
%if %{with tests}
%check
@ -147,15 +106,12 @@ cp -p cython-mode-init.el cython-mode-init.elc %{buildroot}%{_emacs_sitestartdir
%{python3_site}/pyximport/
%pycached %{python3_site}/cython.py
%if %{with emacs}
%files -n emacs-cython-mode
%license LICENSE.txt
%{_emacs_sitelispdir}/cython*.el*
%{_emacs_sitestartdir}/cython*.el*
%endif
%changelog
* Thu Jul 13 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.0.0~rc2-1
- Update to 3.0.0rc2
- The emacs-cython-mode package is no longer part of this project
* Fri Jun 30 2023 Petr Viktorin <pviktori@redhat.com> - 0.29.35-2
- Compile-time Python 3.12 compatibility for CYTHON_TRACE support

View File

@ -1,26 +0,0 @@
From 38339b8598b5cfaef324650368581f6967b024a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Tue, 20 Dec 2022 01:08:58 +0100
Subject: [PATCH] Wrap the docstring of cython-default-compile-format to 80
characters
This should avoid a warning as reported in:
https://bugzilla.redhat.com/show_bug.cgi?id=2155090
---
Tools/cython-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Tools/cython-mode.el b/Tools/cython-mode.el
index 2d9fbae..970a765 100644
--- a/Tools/cython-mode.el
+++ b/Tools/cython-mode.el
@@ -108,7 +108,8 @@
;;;###autoload
(defcustom cython-default-compile-format "cython -a %s"
"Format for the default command to compile a Cython file.
-It will be passed to `format' with `buffer-file-name' as the only other argument."
+It will be passed to `format' with `buffer-file-name'
+as the only other argument."
:group 'cython
:type 'string)

View File

@ -1,43 +0,0 @@
From 03c498d3142ccee2da258c540e96f12c863159fc Mon Sep 17 00:00:00 2001
From: Stefan Behnel <stefan_ml@behnel.de>
Date: Mon, 29 May 2023 22:08:50 +0200
Subject: [PATCH] Avoid using the thread state attribute "use_tracing" in
Python 3.12 where it was removed from the struct.
See PEP-669 (https://peps.python.org/pep-0669/) and the implementation in https://github.com/python/cpython/pull/103083.
There is more to be done to properly support PEP-669, but this makes it compile.
See https://github.com/cython/cython/issues/5450
---
Cython/Utility/Profile.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/Cython/Utility/Profile.c b/Cython/Utility/Profile.c
index 20b599e7979..2b8564b226f 100644
--- a/Cython/Utility/Profile.c
+++ b/Cython/Utility/Profile.c
@@ -61,15 +61,21 @@
#define __Pyx_TraceFrameInit(codeobj) \
if (codeobj) $frame_code_cname = (PyCodeObject*) codeobj;
+
#if PY_VERSION_HEX >= 0x030b00a2
+ #if PY_VERSION_HEX >= 0x030C00b1
+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \
+ ((!(check_tracing) || !(tstate)->tracing) && \
+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
+ #else
#define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \
(unlikely((tstate)->cframe->use_tracing) && \
(!(check_tracing) || !(tstate)->tracing) && \
(!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
+ #endif
- #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
-
- #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
+ #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
+ #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
#elif PY_VERSION_HEX >= 0x030a00b1
#define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \

View File

@ -1 +1 @@
SHA512 (Cython-0.29.35.tar.gz) = 35d679d94e1f731e004b83fb4ae0d569703b0800c913012308146b1c54463ce12cb1cf3733e24162fb357f179444c5ca31108a37850e6c749ddebac5175119f5
SHA512 (Cython-3.0.0rc2.tar.gz) = 42ff1b3f2509c90be6007b9156454ae89c1be26a9dde6ca9c109b0cfa3de30797eeeffef38ea1bfe37a9c8e062c776c8cb755826f8c25aa7c9703fbb031bf643