Skip to content

Commit

Permalink
Merge pull request numpy#12824 from obache/fix/12823
Browse files Browse the repository at this point in the history
BUG: fix to check before apply `shlex.split`
  • Loading branch information
charris authored Jan 23, 2019
2 parents 9c98662 + 5aa8b84 commit d1186c9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions numpy/distutils/fcompiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,19 +466,19 @@ def customize(self, dist = None):
noarch = self.distutils_vars.get('noarch', noopt)
debug = self.distutils_vars.get('debug', False)

f77 = shlex.split(self.command_vars.compiler_f77,
posix=(os.name == 'posix'))
f90 = shlex.split(self.command_vars.compiler_f90,
posix=(os.name == 'posix'))
f77 = self.command_vars.compiler_f77
f90 = self.command_vars.compiler_f90

f77flags = []
f90flags = []
freeflags = []
fixflags = []

if f77:
f77 = shlex.split(f77, posix=(os.name == 'posix'))
f77flags = self.flag_vars.f77
if f90:
f90 = shlex.split(f90, posix=(os.name == 'posix'))
f90flags = self.flag_vars.f90
freeflags = self.flag_vars.free
# XXX Assuming that free format is default for f90 compiler.
Expand All @@ -490,8 +490,8 @@ def customize(self, dist = None):
# environment variable has been customized by CI or a user
# should perhaps eventually be more throughly tested and more
# robustly handled
fix = shlex.split(fix, posix=(os.name == 'posix'))
if fix:
fix = shlex.split(fix, posix=(os.name == 'posix'))
fixflags = self.flag_vars.fix + f90flags

oflags, aflags, dflags = [], [], []
Expand Down

0 comments on commit d1186c9

Please sign in to comment.