diff --git a/setup.py b/setup.py index 77987e4..110a3ab 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ import sys import os import os.path as path +import shlex CLASSIFIERS = """\ Development Status :: 5 - Production/Stable @@ -61,7 +62,9 @@ def _find_args(pat, env): library_dirs = _find_args('-l', 'LIBRARY_DIRS') szip_installed = 'SZIP' in os.environ compress = 'NO_COMPRESS' not in os.environ -extra_link_args = os.environ.get('LINK_ARGS', '') +extra_link_args = None +if "LINK_ARGS" in os.environ: + extra_link_args = shlex.split(os.environ["LINK_ARGS"]) msg = 'Cannot proceed without the HDF4 library. Please ' \ @@ -148,7 +151,7 @@ def _find_args(pat, env): include_dirs = include_dirs, extra_compile_args = extra_compile_args, library_dirs = library_dirs, - extra_link_args=[extra_link_args], + extra_link_args=extra_link_args, libraries = libraries, )