Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
handle additional linker arguments correctly
  • Loading branch information
Daniel Marth committed Jan 21, 2019
commit 9e193f4d7f27de64ed87de3012200399199cc193
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import sys
import os
import os.path as path
import shlex

CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Expand Down Expand Up @@ -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 ' \
Expand Down Expand Up @@ -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,
)

Expand Down