summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2021-07-30 14:51:13 (GMT)
committerGitHub <noreply@github.com>2021-07-30 14:51:13 (GMT)
commit3a806b1f054d263740b487efdb3670019a322682 (patch)
tree56c0959ab3ff625ed5b20d39638305b05205cd30
parent168879e366ec56b20fe4792b5851e8de32aaee87 (diff)
downloadcpython-3a806b1f054d263740b487efdb3670019a322682.zip
cpython-3a806b1f054d263740b487efdb3670019a322682.tar.gz
cpython-3a806b1f054d263740b487efdb3670019a322682.tar.bz2
[3.9] Fail the CI if an optional module fails to compile (GH-27466). (GH-27482)
(cherry picked from commit 7cad0bee80a536c7e47f54cf43174175834f30a0) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
-rw-r--r--.github/workflows/build.yml3
-rw-r--r--.travis.yml1
-rw-r--r--setup.py3
3 files changed, 7 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a4efb42..3c0a414 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -133,6 +133,8 @@ jobs:
runs-on: macos-latest
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
+ env:
+ PYTHONSTRICTEXTENSIONBUILD: 1
steps:
- uses: actions/checkout@v2
- name: Configure CPython
@@ -151,6 +153,7 @@ jobs:
if: needs.check_source.outputs.run_tests == 'true'
env:
OPENSSL_VER: 1.1.1k
+ PYTHONSTRICTEXTENSIONBUILD: 1
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
diff --git a/.travis.yml b/.travis.yml
index 02b2afa..171e4d0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,7 @@ env:
# Set rpath with env var instead of -Wl,-rpath linker flag
# OpenSSL ignores LDFLAGS when linking bin/openssl
- LD_RUN_PATH="${OPENSSL_DIR}/lib"
+ - PYTHONSTRICTEXTENSIONBUILD=1
branches:
only:
diff --git a/setup.py b/setup.py
index 1ac68df..06fd9be 100644
--- a/setup.py
+++ b/setup.py
@@ -540,6 +540,9 @@ class PyBuildExt(build_ext):
"APIs, https://github.com/libressl-portable/portable/issues/381")
print()
+ if os.environ.get("PYTHONSTRICTEXTENSIONBUILD") and (self.failed or self.failed_on_import):
+ raise RuntimeError("Failed to build some stdlib modules")
+
def build_extension(self, ext):
if ext.name == '_ctypes':