-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 3237b4074243704a9cce41dbf6dc14a2a2d4d78e Mon Sep 17 00:00:00 2001 | ||
From: Matt Davis <mrd@redhat.com> | ||
Date: Wed, 12 Jan 2022 15:29:48 -0800 | ||
Subject: [PATCH] WIP keep PyYAML build working on Cython3.0.0a10+ | ||
|
||
* Cython 3.0 changes its build_ext command base class to one that's incompatible with pyyaml's subclass | ||
* temporarily force use of Cython3's `old_build_ext` compatibility class if present | ||
--- | ||
pyproject.toml | 2 +- | ||
setup.py | 6 +++++- | ||
2 files changed, 6 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/pyproject.toml b/pyproject.toml | ||
index 2bf5ec80..3cf9a28d 100644 | ||
--- a/pyproject.toml | ||
+++ b/pyproject.toml | ||
@@ -1,3 +1,3 @@ | ||
[build-system] | ||
-requires = ["setuptools", "wheel", "Cython"] | ||
+requires = ["setuptools", "wheel", "Cython~=3.0a"] | ||
build-backend = "setuptools.build_meta" | ||
diff --git a/setup.py b/setup.py | ||
index 548b19f7..da4a66fa 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -81,7 +81,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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters