!27 Fix build failure due to cython updated

From: @wang--ge 
Reviewed-by: @cherry530 
Signed-off-by: @cherry530
This commit is contained in:
openeuler-ci-bot 2024-02-07 06:26:51 +00:00 committed by Gitee
commit 0f956d5359
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 293a0cead0d90fb19cbfa0e4138f0b3886414b92 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 31 Jan 2024 09:57:35 +0800
Subject: [PATCH] fix build Error due to cython updated
---
setup.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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.33.0

View File

@ -3,11 +3,12 @@
Name: pyYAML
Version: 6.0.1
Release: 1
Release: 2
Summary: YAML parser and emitter for Python
License: MIT
URL: https://github.com/yaml/pyyaml
Source0: https://files.pythonhosted.org/packages/source/P/PyYAML/PyYAML-%{version}.tar.gz
Patch0: Fix-build-Error-due-to-cython-updated.patch
BuildRequires: gcc libyaml-devel
@ -56,6 +57,7 @@ files to object serialization and persistence.
%prep
%setup -q -n PyYAML-%{version}
%patch0 -p1
%build
%if %{with python3}
@ -81,6 +83,9 @@ files to object serialization and persistence.
%endif
%changelog
* Wed Jan 31 2024 Ge Wang <wang__ge@126.com> - 6.0.1-2
- fix build error due to cython updated
* Wed Jul 26 2023 sunhui <sunhui@kylinos.cn> - 6.0.1-1
- Update package to version 6.0.1