mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
eabd4b9fab
d/gdb-14.2-x86_64-1.txz: Upgraded. l/python-PyYAML-6.0.1-x86_64-2.txz: Rebuilt. Fixed build with Cython >= 3. Thanks to Stuart Winter. l/qt6-6.6.2_20240210_15b7e743-x86_64-2.txz: Rebuilt. Fixed the sdpscanner6 symlink by moving INSTALL_LIBEXECDIR to the expected location. x/editres-1.0.9-x86_64-1.txz: Upgraded. x/encodings-1.1.0-noarch-1.txz: Upgraded. x/gccmakedep-1.0.4-noarch-1.txz: Upgraded. x/libXaw3d-1.6.6-x86_64-1.txz: Upgraded. x/libXcursor-1.2.2-x86_64-1.txz: Upgraded. x/libXdmcp-1.1.5-x86_64-1.txz: Upgraded. x/libfontenc-1.1.8-x86_64-1.txz: Upgraded. x/libxcb-1.16.1-x86_64-1.txz: Upgraded. x/listres-1.0.6-x86_64-1.txz: Upgraded. x/mkfontscale-1.2.3-x86_64-1.txz: Upgraded. x/xauth-1.1.3-x86_64-1.txz: Upgraded. x/xlsfonts-1.0.8-x86_64-1.txz: Upgraded.
39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
From 17dc5b6cd96dcfe64fd71789c771ca9b96d260e5 Mon Sep 17 00:00:00 2001
|
|
From: "Andrew J. Hesford" <ajh@sideband.org>
|
|
Date: Fri, 21 Jul 2023 09:50:00 -0400
|
|
Subject: [PATCH] Fix builds with Cython 3
|
|
|
|
This is a *de minimis* fix for building with Cython 3. Recent Cython<3
|
|
releases provided `Cython.Distutils.build_ext` as an alias to
|
|
`Cython.Distutils.old_build_ext.old_build_ext`; Cython 3 drops this
|
|
alias and instead uses a wholly new `Cython.Distutils.build_ext` that
|
|
does not provide the `cython_sources` function used in `setup.py`.
|
|
|
|
Explicitly importing `old_build_ext` preserves the existing behavior for
|
|
recent Cython<3 and uses the correct behavior for Cython 3. Should the
|
|
import fail (*e.g.*, because the version of Cython available predates
|
|
the availability of `old_build_ext`), the import falls back to just
|
|
`Cython.Distutils.build_ext`.
|
|
|
|
Signed-off-by: Andrew J. Hesford <ajh@sideband.org>
|
|
---
|
|
setup.py | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/setup.py b/setup.py
|
|
index 944e7fa2..462b1e95 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -82,7 +82,11 @@
|
|
with_cython = True
|
|
try:
|
|
from Cython.Distutils.extension import Extension as _Extension
|
|
- from Cython.Distutils import build_ext as _build_ext
|
|
+ try:
|
|
+ from Cython.Distutils.old_build_ext import old_build_ext as _build_ext
|
|
+ except ImportError:
|
|
+ from Cython.Distutils import build_ext as _build_ext
|
|
+
|
|
with_cython = True
|
|
except ImportError:
|
|
if with_cython:
|