Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3965c2bb3 | ||
|
|
0437d4abe6 | ||
|
|
072a6204e1 | ||
|
|
b879ba0bb0 | ||
|
|
53e5626e58 | ||
|
|
1a65ed4019 | ||
|
|
bc3aaf9607 | ||
|
|
b879627e2a |
4 changed files with 6 additions and 49 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -22,3 +22,5 @@ PyYAML-3.09.tar.gz
|
|||
/6.0b1.tar.gz
|
||||
/6.0.tar.gz
|
||||
/6.0.1.tar.gz
|
||||
/6.0.2.tar.gz
|
||||
/6.0.3.tar.gz
|
||||
|
|
|
|||
39
731.patch
39
731.patch
|
|
@ -1,39 +0,0 @@
|
|||
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:
|
||||
12
PyYAML.spec
12
PyYAML.spec
|
|
@ -1,5 +1,5 @@
|
|||
Name: PyYAML
|
||||
Version: 6.0.1
|
||||
Version: 6.0.3
|
||||
Release: %autorelease
|
||||
Summary: YAML parser and emitter for Python
|
||||
|
||||
|
|
@ -8,13 +8,10 @@ License: MIT
|
|||
URL: https://github.com/yaml/pyyaml
|
||||
Source: https://github.com/yaml/pyyaml/archive/%{version}.tar.gz
|
||||
|
||||
# Fix build with Cython 3
|
||||
# Proposed upstream but refused (upstream does not want Cython 3)
|
||||
Patch: https://github.com/yaml/pyyaml/pull/731.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libyaml-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pytest
|
||||
|
||||
|
||||
%global _description\
|
||||
|
|
@ -48,9 +45,6 @@ chmod a-x examples/yaml-highlight/yaml_hl.py
|
|||
# remove pre-generated file
|
||||
rm -rf ext/_yaml.c
|
||||
|
||||
# we have a patch for Cython 3
|
||||
sed -i 's/Cython<3.0/Cython/' pyproject.toml
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
|
@ -66,7 +60,7 @@ sed -i 's/Cython<3.0/Cython/' pyproject.toml
|
|||
|
||||
|
||||
%check
|
||||
%{py3_test_envvars} %{python3} tests/lib/test_all.py
|
||||
%pytest
|
||||
|
||||
|
||||
%files -n python3-pyyaml -f %{pyproject_files}
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (6.0.1.tar.gz) = 1c74a92a4ad7d47854dc7bcb2e89b3c8e0b14fa815c7dbfbc22b24480dbba6c81e971c77ee384c494a960914b95f06edf943d7431925a5ed674a0ba830d258e0
|
||||
SHA512 (6.0.3.tar.gz) = a0da43e32d127409ad61b11dc1d733b2e9c743977b3d72c05c81fc2ab183b40bc284452b0874dbeae1a736e1cd4a34f0df641ceefd5e9df38b3e53155fc5f633
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue