Skip to content

Commit

Permalink
Merge pull request #9136 from charris/backport-9115
Browse files Browse the repository at this point in the history
BUG: Compilation crashes in MSVC when LIB or INCLUDE is not set
  • Loading branch information
charris committed May 18, 2017
2 parents 3d87af0 + aab9639 commit 7ea4d3b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions numpy/distutils/msvc9compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ def _merge(old, new):
Here `old` is the environment string before the base class initialize
function is called and `new` is the string after the call. The new string
will be a fixed string if it is not obtained from the current enviroment,
or the same as the old string if obtained from the same enviroment. The aim
will be a fixed string if it is not obtained from the current environment,
or the same as the old string if obtained from the same environment. The aim
here is not to append the new string if it is already contained in the old
string so as to limit the growth of the environment string.
Parameters
----------
old : string
Previous enviroment string.
Previous environment string.
new : string
New environment string.
Expand All @@ -29,10 +29,10 @@ def _merge(old, new):
Updated environment string.
"""
if new in old:
return old
if not old:
return new
if new in old:
return old

# Neither new nor old is empty. Give old priority.
return ';'.join([old, new])
Expand Down

0 comments on commit 7ea4d3b

Please sign in to comment.