Skip to content

Commit 0319b9a

Browse files
dmarthfhs
authored andcommitted
handle additional linker arguments correctly (#19)
1 parent af70edc commit 0319b9a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import sys
2828
import os
2929
import os.path as path
30+
import shlex
3031

3132
CLASSIFIERS = """\
3233
Development Status :: 5 - Production/Stable
@@ -61,7 +62,9 @@ def _find_args(pat, env):
6162
library_dirs = _find_args('-l', 'LIBRARY_DIRS')
6263
szip_installed = 'SZIP' in os.environ
6364
compress = 'NO_COMPRESS' not in os.environ
64-
extra_link_args = os.environ.get('LINK_ARGS', '')
65+
extra_link_args = None
66+
if "LINK_ARGS" in os.environ:
67+
extra_link_args = shlex.split(os.environ["LINK_ARGS"])
6568

6669

6770
msg = 'Cannot proceed without the HDF4 library. Please ' \
@@ -148,7 +151,7 @@ def _find_args(pat, env):
148151
include_dirs = include_dirs,
149152
extra_compile_args = extra_compile_args,
150153
library_dirs = library_dirs,
151-
extra_link_args=[extra_link_args],
154+
extra_link_args=extra_link_args,
152155
libraries = libraries,
153156
)
154157

0 commit comments

Comments
 (0)