Skip to content

Commit

Permalink
Updates to locate libs in conda environemnt
Browse files Browse the repository at this point in the history
  • Loading branch information
gcomoretto committed Oct 29, 2018
1 parent f340ba0 commit 8d76b84
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
14 changes: 12 additions & 2 deletions python/lsst/sconsUtils/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,18 @@ def __init__(self, cfgFile, headers=(), libs=None, hasSwigFiles=True,
if version is not None:
self.version = version
if productDir is None:
state.log.warn("Could not find EUPS product dir for '%s'; using %s."
% (self.eupsProduct, self.root))
try:
python3rdinclude=self._get_config_var("CONFINCLUDEPY")
includeDir, pyFolder = os.path.split(python3rdinclude)
productDir = os.path.join(includeDir, "include")
if os.path.exist(productDir):
self.root = os.path.realpath(productDir)
else:
state.log.warn("Could not find Lib package dir for '%s'; using %s."
% (self.eupsProduct, self.root))
except:
state.log.warn("Could not find EUPS/lib package dir for '%s'; using %s."
% (self.eupsProduct, self.root))
else:
self.root = os.path.realpath(productDir)
self.doxygen = {
Expand Down
1 change: 0 additions & 1 deletion python/lsst/sconsUtils/installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ def InstallEups(env, dest, files=[], presetup=""):
files = [str(f) for f in files] # in case the user used Glob not glob.glob
files += glob.glob(os.path.join("ups", "*.build")) + glob.glob(os.path.join("ups", "*.table")) \
+ glob.glob(os.path.join("ups", "*.cfg")) \
+ glob.glob(os.path.join("configs", "*.cfg")) \
+ glob.glob(os.path.join("ups", "eupspkg*"))
files = list(set(files)) # remove duplicates

Expand Down
1 change: 1 addition & 0 deletions python/lsst/sconsUtils/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def _initEnvironment():
if not m:
continue
cfgPath.append(os.path.join(os.environ[k], "ups"))
cfgPath.append(os.path.join(os.environ[k], "configs"))
if m.group("extra"):
cfgPath.append(os.environ[k])
else:
Expand Down
6 changes: 3 additions & 3 deletions ups/sconsUtils.table
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ setupRequired(pytest_session2file)

envPrepend(PYTHONPATH, ${PRODUCT_DIR}/python)
envPrepend(PATH, ${PRODUCT_DIR}/bin)
#envPrepend(LD_LIBRARY_PATH, $HOME/anaconda3/envs/scipl/lib)
#envPrepend(DYLD_LIBRARY_PATH, $HOME/anaconda3/envs/scipl/lib)
#envPrepend(LSST_LIBRARY_PATH, $HOME/anaconda3/envs/scipl/lib)
envPrepend(LD_LIBRARY_PATH, $HOME/anaconda3/envs/scipl/lib)
envPrepend(DYLD_LIBRARY_PATH, $HOME/anaconda3/envs/scipl/lib)
envPrepend(LSST_LIBRARY_PATH, $HOME/anaconda3/envs/scipl/lib)

0 comments on commit 8d76b84

Please sign in to comment.