Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for finding eigen in conda #14

Merged
merged 1 commit into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ def __init__(self, user=False):
self.user = user

def __str__(self):
if "PYBIND11_INCLUDE" in os.environ:
return os.environ["PYBIND11_INCLUDE"]
if pybind11_path is not None:
return os.path.join(os.environ["PYBIND11_DIR"], "include")
else:
import pybind11

return pybind11.get_include(self.user)


Expand All @@ -61,11 +62,12 @@ def __init__(self, user=False):
self.user = user

def __str__(self):
if "EIGEN_INCLUDE" in os.environ:
return os.environ["EIGEN_INCLUDE"]
if eigen_path is not None:
return os.path.join(os.environ["EIGEN_DIR"], "include")
else:
import peigen

return peigen.header_path


Expand Down
11 changes: 11 additions & 0 deletions ups/eupspkg.cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
# This works around DM-5409, wherein mpi4py was attempting to use an OS X 10.5
# SDK, based on querying Anaconda, and failing; and DM-6133, wherein distutils
# refuses to let us target an earlier SDK than Python was compiled with.

# Support for CONDA_PREFIX (conda-forge compilers)
if [[ -n "$CONDA_PREFIX" ]]; then
export EIGEN_INCLUDE=$CONDA_PREFIX/include/eigen3
fi

# Inside conda-build (stackvana)
if [[ "$CONDA_BUILD" == "1" ]]; then
export EIGEN_INCLUDE=$PREFIX/include/eigen3
fi

if [ -z "$MACOSX_DEPLOYMENT_TARGET" ]; then
MIN_DEPLOYMENT_TARGET=9
CFG_DEPLOYMENT_TARGET=$(python -c "import sysconfig; print((sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.$MIN_DEPLOYMENT_TARGET').split('.')[1])")
Expand Down