LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
sconsUtils
11.0.rc3
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 Wed Sep 16 2015 13:35:35 for LSSTApplications by
1.8.5