# -*- python -*-

import lsst.sconsUtils
import os

# scons steals our environment away, so we have to reinstate it
env = lsst.sconsUtils.env.Clone()
for name in ("PYTHONPATH", "LD_LIBRARY_PATH",
             "DYLD_LIBRARY_PATH", "PATH"):
    if name in os.environ:
        env.AppendENVPath(name, os.environ[name])

# we may need an explicit library load path specified in the command
libpathstr = lsst.sconsUtils.utils.libraryLoaderEnvironment()

# We always run these commands with an explicit python rather than relying on the shebang
python = "{} python".format(libpathstr)

command = "%s bin.src/makeLsstCameraRepository.py --clobber" % (python, )
camera = env.Command('camera/', [], command)
lsst.sconsUtils.targets['description'] = camera
# Dependencies are defined in base SConstruct
