- add build-with-cython3.patch from 6.0.2rc1 to build with
cython3 (needed for python 3.13+) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyYAML?expand=0&rev=59
This commit is contained in:
parent
b69ead11b9
commit
d010eb6b7f
17
build-with-cython3.patch
Normal file
17
build-with-cython3.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Index: PyYAML-6.0.1/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- PyYAML-6.0.1.orig/setup.py
|
||||||
|
+++ PyYAML-6.0.1/setup.py
|
||||||
|
@@ -82,7 +82,11 @@ if 'sdist' in sys.argv or os.environ.get
|
||||||
|
with_cython = True
|
||||||
|
try:
|
||||||
|
from Cython.Distutils.extension import Extension as _Extension
|
||||||
|
- from Cython.Distutils import build_ext as _build_ext
|
||||||
|
+ try:
|
||||||
|
+ # try old_build_ext from Cython > 3 first, until we can dump it entirely
|
||||||
|
+ 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:
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 1 10:52:46 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add build-with-cython3.patch from 6.0.2rc1 to build with
|
||||||
|
cython3 (needed for python 3.13+)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 26 03:18:33 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
Mon Feb 26 03:18:33 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ Summary: YAML parser and emitter for Python
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/yaml/pyyaml
|
URL: https://github.com/yaml/pyyaml
|
||||||
Source: https://files.pythonhosted.org/packages/source/P/PyYAML/PyYAML-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/P/PyYAML/PyYAML-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module Cython with %python-Cython < 3}
|
Patch1: build-with-cython3.patch
|
||||||
|
BuildRequires: %{python_module Cython}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
@ -51,6 +52,7 @@ configuration files to object serialization and persistance.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
|
export PYYAML_FORCE_CYTHON=1
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
# Fix example permissions.
|
# Fix example permissions.
|
||||||
find examples/ -type f | xargs chmod a-x
|
find examples/ -type f | xargs chmod a-x
|
||||||
|
Loading…
Reference in New Issue
Block a user