LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
sconsUtils
11.0
python
lsst
sconsUtils
eupsForScons.py
Go to the documentation of this file.
1
from
__future__
import
absolute_import, division, print_function
2
import
os
3
4
try
:
5
from
eups
import
*
6
eupsLoaded =
True
7
except
ImportError:
8
eupsLoaded =
False
9
10
def
haveEups
():
11
return
eupsLoaded
12
13
if
not
haveEups
():
14
#
15
# Fake what we can so sconsUtils can limp along without eups
16
#
17
def
flavor
():
18
from
.state
import
env, log
19
20
log.warn(
"Unable to import eups; guessing flavor"
)
21
22
if
env[
'PLATFORM'
] ==
"posix"
:
23
return
os.uname()[0].title()
24
else
:
25
return
env[
'PLATFORM'
].title()
26
27
def
productDir
(name):
28
return
os.environ.get(
"%s_DIR"
% name.upper())
29
30
def
findSetupVersion
(eupsProduct):
31
return
None
,
None
,
None
,
None
,
flavor
()
32
33
class
_Eups
(object):
34
def
__call__
(self):
35
return
self
36
Eups =
_Eups
()
37
38
Eups.findSetupVersion = findSetupVersion
39
40
class
_Utils
(object):
41
pass
42
utils = _Utils()
43
44
def
setupEnvNameFor
(productName):
45
return
"SETUP_%s"
% productName
46
47
utils.setupEnvNameFor = setupEnvNameFor
48
49
def
getEups
():
50
""" Return a cached Eups instance, auto-creating if necessary """
51
try
:
52
return
getEups._eups
53
except
AttributeError:
54
getEups._eups = Eups()
55
return
getEups._eups
lsst.sconsUtils.eupsForScons._Eups.__call__
def __call__
Definition:
eupsForScons.py:34
lsst.sconsUtils.eupsForScons.findSetupVersion
def findSetupVersion
Definition:
eupsForScons.py:30
lsst.sconsUtils.eupsForScons._Utils
Definition:
eupsForScons.py:40
lsst.sconsUtils.eupsForScons.productDir
def productDir
Definition:
eupsForScons.py:27
lsst.sconsUtils.eupsForScons.flavor
def flavor
Definition:
eupsForScons.py:17
lsst.sconsUtils.eupsForScons.getEups
def getEups
Definition:
eupsForScons.py:49
lsst.sconsUtils.eupsForScons.haveEups
def haveEups
Definition:
eupsForScons.py:10
lsst.sconsUtils.eupsForScons._Eups
Definition:
eupsForScons.py:33
lsst.sconsUtils.eupsForScons.setupEnvNameFor
def setupEnvNameFor
Definition:
eupsForScons.py:44
Generated on Thu Sep 24 2015 02:29:24 for LSSTApplications by
1.8.5