36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From fb22c1d0e06327f5c836bb02b0986894153ff56a Mon Sep 17 00:00:00 2001
|
|
From: Christoph Reiter <reiter.christoph@gmail.com>
|
|
Date: Sun, 21 Nov 2021 14:00:06 +0100
|
|
Subject: [PATCH 104/N] distutils: add back gcc_version
|
|
|
|
older numpy depends on it and there are users building it directly via pip
|
|
---
|
|
Lib/distutils/cygwinccompiler.py | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
|
|
index 6e22555..d8c8428 100644
|
|
--- a/Lib/distutils/cygwinccompiler.py
|
|
+++ b/Lib/distutils/cygwinccompiler.py
|
|
@@ -56,6 +56,7 @@
|
|
from distutils.file_util import write_file
|
|
from distutils.errors import (DistutilsExecError, CCompilerError,
|
|
CompileError, UnknownFileError)
|
|
+from distutils.version import LooseVersion
|
|
from distutils.spawn import find_executable
|
|
from subprocess import Popen, check_output
|
|
|
|
@@ -114,6 +115,12 @@ def __init__(self, verbose=0, dry_run=0, force=0):
|
|
self.cc = os.environ.get('CC', 'gcc')
|
|
self.cxx = os.environ.get('CXX', 'g++')
|
|
|
|
+ # Older numpy dependend on this existing to check for ancient
|
|
+ # gcc versions. This doesn't make much sense with clang etc so
|
|
+ # just hardcode to something recent.
|
|
+ # https://github.com/numpy/numpy/pull/20333
|
|
+ self.gcc_version = LooseVersion("11.2.0")
|
|
+
|
|
self.linker_dll = self.cc
|
|
shared_option = "-shared"
|
|
|