7 return [name
for name
in os.listdir(a_dir)
8 if os.path.isdir(os.path.join(a_dir, name))]
10 def mk_jo_proxy(targetbasepath, pkgname, proxypath, addtosearch=True):
11 "Make a JO proxy dir such that the MCxxJobOptions/dddd dirs contents are found via include(MCxxJobOptions/yyyy)"
13 if os.path.exists(proxypath):
14 shutil.rmtree(proxypath)
16 os.environ[
'LOCAL_INSTALL_DIR'] = (os.environ[
'JOBOPTSEARCHPATH']).
split(
":")[0]
17 os.environ[
'LOCAL_DATA_DIR'] = (os.environ[
'DATAPATH']).
split(
":")[0]
22 if ((
'.svn' not in dd)
and (
'cmt' not in dd)
and (
'_joproxy' not in dd)):
23 deepdir = os.path.join(targetbasepath, dd)
25 subdirlist = subdirlist+[
"%s" % dd+
"/%s" % item
for item
in subdirlist1]
26 for d
in (subdirlist):
28 if ((
'.svn' not in d)
and (
'cmt' not in d)
and (
'_joproxy' not in d)
and (
'share/' not in d)):
29 dpath = os.path.join(proxypath, d)
33 if (
'nonStandard' in dpath):
34 dpath_ex = os.path.join(dpath,pkgname)
38 os.symlink(os.path.join(targetbasepath, d), os.path.join(dpath_ex,
"nonStandard"))
40 os.symlink(os.path.join(targetbasepath, d), os.path.join(dpath, pkgname))
42 os.environ[
"JOBOPTSEARCHPATH"] = dpath+
":"+os.environ[
"JOBOPTSEARCHPATH"]
43 os.environ[
"DATAPATH"] =os.path.join(targetbasepath, d)+
":"+os.environ[
"DATAPATH"]
45 os.environ[
"JOBOPTSEARCHPATH"] = os.environ[
'LOCAL_INSTALL_DIR']+
":"+os.environ[
"JOBOPTSEARCHPATH"]
46 os.environ[
"DATAPATH"] = os.environ[
'LOCAL_DATA_DIR']+
":"+os.environ[
"DATAPATH"]