From 2b54640ad50bbbfecfb4c9cc8c9dd9c161f6a52e Mon Sep 17 00:00:00 2001 From: jakobjakobson13 <43045863+jakobjakobson13@users.noreply.github.com> Date: Wed, 12 Aug 2020 19:55:50 +0200 Subject: MAINT: Remove _EXTRAFLAGS variable (#17050) Delete unused _EXTRAFLAGS variable throughout file --- numpy/distutils/fcompiler/gnu.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'numpy/distutils/fcompiler/gnu.py') diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index caa08549e..7004b5d80 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -23,13 +23,6 @@ def is_win64(): return sys.platform == "win32" and platform.architecture()[0] == "64bit" -if is_win64(): - #_EXTRAFLAGS = ["-fno-leading-underscore"] - _EXTRAFLAGS = [] -else: - _EXTRAFLAGS = [] - - class GnuFCompiler(FCompiler): compiler_type = 'gnu' compiler_aliases = ('g77', ) @@ -297,11 +290,11 @@ class Gnu95FCompiler(GnuFCompiler): executables = { 'version_cmd' : ["", "-dumpversion"], 'compiler_f77' : [None, "-Wall", "-g", "-ffixed-form", - "-fno-second-underscore"] + _EXTRAFLAGS, + "-fno-second-underscore"], 'compiler_f90' : [None, "-Wall", "-g", - "-fno-second-underscore"] + _EXTRAFLAGS, + "-fno-second-underscore"], 'compiler_fix' : [None, "-Wall", "-g","-ffixed-form", - "-fno-second-underscore"] + _EXTRAFLAGS, + "-fno-second-underscore"], 'linker_so' : ["", "-Wall", "-g"], 'archiver' : ["ar", "-cr"], 'ranlib' : ["ranlib"], -- cgit v1.2.1 From 42f9d02a249103fd024241a17ba5896fd2e18bff Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 2 Sep 2020 15:44:35 +0300 Subject: MAINT: use sysconfig not distutils.sysconfig where possible --- numpy/distutils/fcompiler/gnu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/distutils/fcompiler/gnu.py') diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index 7004b5d80..0d9d769c2 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -231,7 +231,7 @@ class GnuFCompiler(FCompiler): def _c_arch_flags(self): """ Return detected arch flags from CFLAGS """ - from distutils import sysconfig + import sysconfig try: cflags = sysconfig.get_config_vars()['CFLAGS'] except KeyError: -- cgit v1.2.1 From 1ccb4c6dbfa6194d1627885e39f81823bce44fc7 Mon Sep 17 00:00:00 2001 From: FX Coudert Date: Thu, 3 Dec 2020 16:44:16 +0100 Subject: Update gnu.py --- numpy/distutils/fcompiler/gnu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/distutils/fcompiler/gnu.py') diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index 0d9d769c2..68d1501ee 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -126,7 +126,7 @@ class GnuFCompiler(FCompiler): target = '10.9' s = f'Env. variable MACOSX_DEPLOYMENT_TARGET set to {target}' warnings.warn(s, stacklevel=2) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = target + os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(target) opt.extend(['-undefined', 'dynamic_lookup', '-bundle']) else: opt.append("-shared") -- cgit v1.2.1