diff --git a/Fix-build-Error-due-to-cython-updated.patch b/Fix-build-Error-due-to-cython-updated.patch new file mode 100644 index 0000000000000000000000000000000000000000..1818e8813d596dda9aee048d53eaf439c1c9c0a6 --- /dev/null +++ b/Fix-build-Error-due-to-cython-updated.patch @@ -0,0 +1,29 @@ +From 293a0cead0d90fb19cbfa0e4138f0b3886414b92 Mon Sep 17 00:00:00 2001 +From: "Andrew J. Hesford" +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 + diff --git a/PyYAML.spec b/PyYAML.spec index 1f3696943c1727c2f694caab170e3e935f27922b..d0e5272b7f80733b8edc33f53775b4e6c6a197b8 100644 --- a/PyYAML.spec +++ b/PyYAML.spec @@ -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 - 6.0.1-2 +- fix build error due to cython updated + * Wed Jul 26 2023 sunhui - 6.0.1-1 - Update package to version 6.0.1