mirror of
https://git.yoctoproject.org/poky
synced 2026-02-12 11:43:04 +01:00
python3-pyyaml: update 6.0.1 -> 6.0.2
With this release, cython 3.x is finally officially supported. (From OE-Core rev: 4ea0c1eb42624ea142dd3d319d2bf750eb1af764) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
48c5cf7500
commit
ac87a68897
@@ -1,54 +0,0 @@
|
||||
From 9cc23db56add79357b8f8257fe6fc0d6879d4579 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>
|
||||
Upstream-Status: Denied [https://github.com/yaml/pyyaml/pull/731]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
pyproject.toml | 2 +-
|
||||
setup.py | 6 +++++-
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 4bc04c0..2bf5ec8 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -1,3 +1,3 @@
|
||||
[build-system]
|
||||
-requires = ["setuptools", "wheel", "Cython<3.0"]
|
||||
+requires = ["setuptools", "wheel", "Cython"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 65b0ea0..4461580 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -82,7 +82,11 @@ if 'sdist' in sys.argv or os.environ.get('PYYAML_FORCE_CYTHON') == '1':
|
||||
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:
|
||||
--
|
||||
2.39.2
|
||||
|
||||
Reference in New Issue
Block a user