Skip to content
Open
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
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,16 @@ class CustomBuildPy(_build_py, object):
def run(self):
env = {}
env["PATH"] = os.environ["PATH"]
# Ensure that the library paths are set correctly in build environment
for var in ("LD_LIBRARY_PATH", "LIBRARY_PATH"):
if var in os.environ:
env[var] = os.environ[var]
# Check if we are building with MPI support
if self.distribution.no_mpi is None:
env["MPI"] = "1"
# Copy over I_MPI_ROOT for intel MPI builds if it exists
if "I_MPI_ROOT" in os.environ:
env["I_MPI_ROOT"] = os.environ["I_MPI_ROOT"]
# These need to be set so that build_ext uses the right compilers
cc_compiler = subprocess.check_output(["make", "print_CC"]).decode('utf-8').strip()
os.environ["CC"] = cc_compiler
Expand Down