Files
MINGW-packages/mingw-w64-python3.10/0129-Skip-building-c-extensions-if-python-is-running-in-b.patch
2022-01-29 11:19:11 +05:30

33 lines
1.1 KiB
Diff

From 2f3cb98e435e6bf104d86d78d045bb66f07b50c9 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 129/N] Skip building c-extensions if python is running in
build tree
Signed-off-by: Naveen M K <naveen521kk@gmail.com>
---
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.34.1