Skip to content

Commit

Permalink
test setting MPI4PY_INCLUDE in environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jswhit committed Nov 13, 2022
1 parent d4001e5 commit 82f4acb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/miniconda.yml
Expand Up @@ -71,7 +71,8 @@ jobs:
micromamba activate TEST
export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
nc-config --all
pip install -v -v -v --no-build-isolation -e . --no-deps --force-reinstall
export MPI4PY_INCLUDE=`python -c 'import mpi4py; print(mpi4py.get_include())'`
pip install -v -e . --no-deps --force-reinstall
- name: Debug conda
shell: bash -l {0}
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Expand Up @@ -685,8 +685,11 @@ def _populate_hdf5_info(dirstosearch, inc_dirs, libs, lib_dirs):
f.close()

if has_parallel4_support or has_pnetcdf_support:
import mpi4py
inc_dirs.append(mpi4py.get_include())
if os.environ.get('MPI4PY_INCLUDE'):
inc_dirs.append(os.environ.get('MPI4PY_INCLUDE'))
else:
import mpi4py
inc_dirs.append(mpi4py.get_include())
# mpi_incdir should not be needed if using nc-config
# (should be included in nc-config --cflags)
if mpi_incdir is not None: inc_dirs.append(mpi_incdir)
Expand Down

0 comments on commit 82f4acb

Please sign in to comment.