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 Aug 25, 2023
1 parent 173b17f commit a197f1d
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 a197f1d

Please sign in to comment.