Files
MINGW-packages/mingw-w64-python/0125-Skip-building-c-extensions-if-python-is-running-in-b.patch
2022-06-10 17:54:24 +02:00

32 lines
1.1 KiB
Diff

From 77c1c9340da9fe43e744cc4e9f42ec98c6d278f0 Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen521kk@gmail.com>
Date: Fri, 21 Jan 2022 20:50:25 +0530
Subject: [PATCH 125/N] Skip building c-extensions if python is running in
build tree
---
mingw_smoketests.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/mingw_smoketests.py b/mingw_smoketests.py
index 527aafb..2c5e2a0 100644
--- a/mingw_smoketests.py
+++ b/mingw_smoketests.py
@@ -226,6 +226,13 @@ class Tests(unittest.TestCase):
import textwrap
from pathlib import Path
+ if sysconfig.is_python_build():
+ # we are running this test without installing and is known
+ # to cause errors with building c-extensions
+ # so we are skipping this test
+ raise unittest.SkipTest("Skipping test as building c-extension isn't supported \
+ without installing python")
+
with tempfile.TemporaryDirectory() as tmppro:
subprocess.check_call([sys.executable, "-m", "ensurepip", "--user"])
with Path(tmppro, "setup.py").open("w") as f:
--
2.36.1