Skip to content

Commit

Permalink
Code style corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
gcomoretto committed Oct 29, 2018
1 parent 8ea99a0 commit b27c020
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions python/lsst/sconsUtils/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import os.path
import collections
import imp
import re
import subprocess
import SCons.Script
from . import eupsForScons
from SCons.Script.SConscript import SConsEnvironment
Expand Down Expand Up @@ -283,8 +285,8 @@ def _get_config_var(name):
return result

def configurePython(self, conf, packages, check=False, build=True):
lsst.sconsUtils.log.info("Configuring package '%s'." % self.name)
python3rdinclude=self._get_config_var("CONFINCLUDEPY")
state.log.info("Configuring package '%s'." % self.name)
python3rdinclude = self._get_config_var("CONFINCLUDEPY")
conf.env.AppendUnique(XCPPPATH=python3rdinclude)
conf.env.AppendUnique(XCPPPATH=python3rdinclude + "/..")
libDir = self._get_config_var("LIBPL")
Expand All @@ -293,36 +295,36 @@ def configurePython(self, conf, packages, check=False, build=True):
mat = re.search("(python.*)\.(a|so|dylib)$", pylibrary)
if mat:
conf.env.libs["python"].append(mat.group(1))
lsst.sconsUtils.log.info("Adding '%s' to target 'python'." % mat.group(1))
state.log.info("Adding '%s' to target 'python'." % mat.group(1))
for w in (" ".join([self._get_config_var("MODLIBS"),
self._get_config_var("SHLIBS")])).split():
mat = re.search(r"^-([Ll])(.*)", w)
if mat:
lL = mat.group(1)
arg = mat.group(2)
if lL == "l":
if not arg in conf.env.libs:
if arg not in conf.env.libs:
conf.env.libs["python"].append(arg)
lsst.sconsUtils.log.info("Adding '%s' to target 'python'." % arg)
state.log.info("Adding '%s' to target 'python'." % arg)
else:
if os.path.isdir(arg):
conf.env.AppendUnique(LIBPATH=[arg])
lsst.sconsUtils.log.info("Adding '%s' to link path." % arg)
state.log.info("Adding '%s' to link path." % arg)
if conf.env['PLATFORM'] == 'darwin':
frameworkDir = libDir # search up the libDir tree for the proper home for frameworks
while frameworkDir and not re.match("^//*$", frameworkDir):
frameworkDir, d2 = os.path.split(frameworkDir)
if d2 == "Python.framework":
if not "Python" in os.listdir(os.path.join(frameworkDir, d2)):
lsst.sconUtils.log.warn(
if "Python" not in os.listdir(os.path.join(frameworkDir, d2)):
state.log.warn(
"Expected to find Python in framework directory %s, but it isn't there"
% frameworkDir
)
)
return False
break
opt = "-F%s" % frameworkDir
if opt not in conf.env["LDMODULEFLAGS"]:
conf.env.Append(LDMODULEFLAGS = [opt,])
conf.env.Append(LDMODULEFLAGS=[opt, ])
return True


Expand Down

0 comments on commit b27c020

Please sign in to comment.