[yt-svn] commit/yt: chummels: Merged in xarthisius/yt (pull request #2053)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Mar 21 14:16:05 PDT 2016
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/bed01b2c838c/
Changeset: bed01b2c838c
Branch: yt
User: chummels
Date: 2016-03-21 21:15:54+00:00
Summary: Merged in xarthisius/yt (pull request #2053)
Add proper -I and -L flags for embree when using conda's python
Affected #: 2 files
diff -r e870ed5eb0e897bbaf4be9da9c78dbf0e0fcdd42 -r bed01b2c838c2b3a19b4c90c04bacc9e057abf07 setup.py
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@
from setuptools.command.build_py import build_py as _build_py
from setupext import \
check_for_openmp, check_for_pyembree, read_embree_location, \
- get_mercurial_changeset_id
+ get_mercurial_changeset_id, in_conda_env
if sys.version_info < (2, 7):
print("yt currently requires Python version 2.7")
@@ -257,14 +257,21 @@
]
embree_prefix = os.path.abspath(read_embree_location())
+ embree_inc_dir = [os.path.join(embree_prefix, 'include')]
+ embree_lib_dir = [os.path.join(embree_prefix, 'lib')]
+ if in_conda_env():
+ conda_basedir = os.path.dirname(os.path.dirname(sys.executable))
+ embree_inc_dir.append(os.path.join(conda_basedir, 'include'))
+ embree_lib_dir.append(os.path.join(conda_basedir, 'lib'))
+
if _platform == "darwin":
embree_lib_name = "embree.2"
else:
embree_lib_name = "embree"
for ext in embree_extensions:
- ext.include_dirs.append(os.path.join(embree_prefix, 'include'))
- ext.library_dirs.append(os.path.join(embree_prefix, 'lib'))
+ ext.include_dirs += embree_inc_dir
+ ext.library_dirs += embree_lib_dir
ext.language = "c++"
ext.libraries += ["m", embree_lib_name]
diff -r e870ed5eb0e897bbaf4be9da9c78dbf0e0fcdd42 -r bed01b2c838c2b3a19b4c90c04bacc9e057abf07 setupext.py
--- a/setupext.py
+++ b/setupext.py
@@ -59,6 +59,8 @@
return None
return os.path.dirname(fn)
+def in_conda_env():
+ return any(s in sys.version for s in ("Anaconda", "Continuum"))
def read_embree_location():
'''
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list