Skip to content

Commit

Permalink
distutils: add back gcc_version
Browse files Browse the repository at this point in the history
older numpy depends on it and there are users building it directly via pip
  • Loading branch information
lazka committed Nov 21, 2021
1 parent 8bcd28b commit 825cae1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/distutils/cygwinccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit 825cae1

Please sign in to comment.