From 92ec54ed0ace1a712d5975c3413a21c8c3eb8ffe Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 13 May 2024 08:40:59 +0200 Subject: [PATCH] Integrate https://github.com/yaml/pyyaml/pull/731 --- ports/py-pyyaml/cy-me-a-river.patch | 17 +++++++++++++++++ ports/py-pyyaml/portfile.cmake | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 ports/py-pyyaml/cy-me-a-river.patch diff --git a/ports/py-pyyaml/cy-me-a-river.patch b/ports/py-pyyaml/cy-me-a-river.patch new file mode 100644 index 0000000..95d88f9 --- /dev/null +++ b/ports/py-pyyaml/cy-me-a-river.patch @@ -0,0 +1,17 @@ +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: diff --git a/ports/py-pyyaml/portfile.cmake b/ports/py-pyyaml/portfile.cmake index 2461fee..2d98912 100644 --- a/ports/py-pyyaml/portfile.cmake +++ b/ports/py-pyyaml/portfile.cmake @@ -3,6 +3,8 @@ vcpkg_from_pythonhosted( PACKAGE_NAME PyYAML VERSION ${VERSION} SHA512 94a29924484f557c0966d485c2b70232909253f27fcea9b89e1db1462abf61f2f85d55fbae0177b2bed70eb5daa75813551e868df4df4cddfdee9a87bd08485f + PATCHES + cy-me-a-river.patch ) vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}" OPTIONS -x)