2010-08-25 06:57:11 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
|
|
import re
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import string
|
|
|
|
import subprocess
|
2010-08-25 09:14:57 -05:00
|
|
|
import optparse
|
2010-08-25 06:57:11 -05:00
|
|
|
|
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
reCoriolisPattern = re.compile( r".*coriolis.*" )
|
|
|
|
reReleaseSharedPattern = re.compile( r".*Release\.Shared.*" )
|
|
|
|
reReleaseStaticPattern = re.compile( r".*Release\.Static.*" )
|
|
|
|
reDebugSharedPattern = re.compile( r".*Debug\.Shared.*" )
|
|
|
|
reDebugStaticPattern = re.compile( r".*Debug\.Static.*" )
|
2010-08-25 06:57:11 -05:00
|
|
|
|
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
def scrubPath ( pathName ):
|
|
|
|
pathEnv = os.getenv( pathName )
|
2010-08-25 06:57:11 -05:00
|
|
|
if not pathEnv: return ""
|
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
pathList = string.split( pathEnv, ':' )
|
|
|
|
scrubbedList = []
|
2010-08-25 06:57:11 -05:00
|
|
|
for pathElement in pathList:
|
2017-04-14 05:09:48 -05:00
|
|
|
if reCoriolisPattern .match(pathElement) \
|
|
|
|
or reReleaseSharedPattern.match(pathElement) \
|
|
|
|
or reReleaseStaticPattern.match(pathElement) \
|
|
|
|
or reDebugSharedPattern .match(pathElement) \
|
|
|
|
or reDebugStaticPattern .match(pathElement):
|
|
|
|
continue
|
|
|
|
scrubbedList += [ pathElement ]
|
2010-08-25 06:57:11 -05:00
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
if len(scrubbedList) == 0: return ""
|
2010-08-25 06:57:11 -05:00
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
scrubbedEnv = scrubbedList[0]
|
|
|
|
for pathElement in scrubbedList[1:]:
|
|
|
|
scrubbedEnv += ":" + pathElement
|
2010-08-25 06:57:11 -05:00
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
return scrubbedEnv
|
2010-08-25 06:57:11 -05:00
|
|
|
|
|
|
|
|
|
|
|
def guessOs ():
|
2019-03-04 07:20:13 -06:00
|
|
|
useDevtoolset = False
|
2014-12-09 16:49:46 -06:00
|
|
|
osSlsoc7x_64 = re.compile (".*Linux.*el7.*x86_64.*")
|
2012-11-16 06:46:27 -06:00
|
|
|
osSlsoc6x_64 = re.compile (".*Linux.*el6.*x86_64.*")
|
|
|
|
osSlsoc6x = re.compile (".*Linux.*(el|slsoc)6.*")
|
|
|
|
osSLSoC5x_64 = re.compile (".*Linux.*el5.*x86_64.*")
|
|
|
|
osSLSoC5x = re.compile (".*Linux.*(el5|2.6.23.13.*SoC).*")
|
2015-02-27 11:16:03 -06:00
|
|
|
osFedora_64 = re.compile (".*Linux.*fc.*x86_64.*")
|
|
|
|
osFedora = re.compile (".*Linux.*fc.*")
|
2012-11-16 06:46:27 -06:00
|
|
|
osLinux_64 = re.compile (".*Linux.*x86_64.*")
|
|
|
|
osLinux = re.compile (".*Linux.*")
|
|
|
|
osDarwin = re.compile (".*Darwin.*")
|
|
|
|
osUbuntu1004 = re.compile (".*Linux.*ubuntu.*")
|
|
|
|
osUbuntu1004_64 = re.compile (".*Linux.*ubuntu.*x86_64.*")
|
|
|
|
osFreeBSD8x_amd64 = re.compile (".*FreeBSD 8.*amd64.*")
|
|
|
|
osFreeBSD8x_64 = re.compile (".*FreeBSD 8.*x86_64.*")
|
|
|
|
osFreeBSD8x = re.compile (".*FreeBSD 8.*")
|
Support for Windows/Cygwin, part 2.
* Change: In bootstrap, in ccb, builder and coriolisEnv.py, correct detection
of the windows architecture (32 or 64 bits). Under Cygwin, add the
directory of the dll into the PATH also. Uses "site-package" as the
location of Python modules (*not* "dist-package").
Use gnu++0x under Cygwin instead of c++11.
* Change: In Etesian, if Coloquinte is not found, do not stop the compilation,
just disable the tool altogether.
* Change: In Hurricane, In Backtrace, disable backtrace under Cygwin as it
uses features specific of the glibc.
* Change: In Knik, use HUGE_VAL instead of HUGE (not present under Cygwin),
add the <cmath> header.
* Change: In Unicorn, Coloquinte no longer stops the compilation.
2014-07-22 17:55:50 -05:00
|
|
|
osCygwinW7_64 = re.compile (".*CYGWIN_NT-6\.1.*x86_64.*")
|
|
|
|
osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
|
|
|
osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
|
|
|
osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
2015-10-02 08:59:01 -05:00
|
|
|
osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*")
|
|
|
|
osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*")
|
2010-08-25 06:57:11 -05:00
|
|
|
|
|
|
|
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
|
|
|
lines = uname.stdout.readlines()
|
|
|
|
|
2010-08-25 08:03:30 -05:00
|
|
|
libDir="lib"
|
2014-12-09 16:49:46 -06:00
|
|
|
if osSlsoc7x_64.match(lines[0]):
|
|
|
|
osType = "Linux.el7_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osSlsoc6x_64.match(lines[0]):
|
2014-12-05 11:50:15 -06:00
|
|
|
osType = "Linux.slsoc6x_64"
|
|
|
|
libDir = "lib64"
|
2019-03-04 07:20:13 -06:00
|
|
|
useDevtoolset = True
|
2014-12-05 11:50:15 -06:00
|
|
|
elif osSlsoc6x.match(lines[0]):
|
|
|
|
osType = "Linux.slsoc6x"
|
2019-03-04 07:20:13 -06:00
|
|
|
useDevtoolset = True
|
2011-04-12 15:36:00 -05:00
|
|
|
elif osSLSoC5x_64.match(lines[0]):
|
2014-12-05 11:50:15 -06:00
|
|
|
osType = "Linux.SLSoC5x_64"
|
|
|
|
libDir = "lib64"
|
2011-02-09 09:47:27 -06:00
|
|
|
elif osSLSoC5x.match(lines[0]):
|
|
|
|
osType = "Linux.SLSoC5x"
|
2015-02-27 11:16:03 -06:00
|
|
|
elif osFedora_64.match(lines[0]):
|
|
|
|
osType = "Linux.fc_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osFedora.match(lines[0]):
|
|
|
|
osType = "Linux.fc"
|
2011-02-02 04:40:25 -06:00
|
|
|
elif osUbuntu1004.match(lines[0]):
|
|
|
|
osType = "Linux.Ubuntu1004"
|
2011-02-09 09:47:27 -06:00
|
|
|
elif osUbuntu1004_64.match(lines[0]):
|
|
|
|
osType = "Linux.Ubuntu1004_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osLinux_64.match(lines[0]):
|
|
|
|
osType = "Linux.x86_64"
|
2015-05-03 14:10:42 -05:00
|
|
|
if(os.path.exists("/usr/lib64/")):
|
|
|
|
libDir = "lib64"
|
2011-02-09 09:47:27 -06:00
|
|
|
elif osLinux.match(lines[0]):
|
|
|
|
osType = "Linux.i386"
|
2012-11-16 06:46:27 -06:00
|
|
|
elif osFreeBSD8x_64.match(lines[0]):
|
|
|
|
osType = "FreeBSD.8x.x86_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osFreeBSD8x_amd64.match(lines[0]):
|
|
|
|
osType = "FreeBSD.8x.amd64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osFreeBSD8x.match(lines[0]):
|
|
|
|
osType = "FreeBSD.8x.i386"
|
2011-02-09 09:47:27 -06:00
|
|
|
elif osDarwin.match(lines[0]):
|
|
|
|
osType = "Darwin"
|
2014-07-13 06:14:49 -05:00
|
|
|
elif osCygwinW7_64.match(lines[0]):
|
|
|
|
osType = "Cygwin.W7_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osCygwinW7.match(lines[0]):
|
|
|
|
osType = "Cygwin.W7"
|
|
|
|
elif osCygwinW8_64.match(lines[0]):
|
|
|
|
osType = "Cygwin.W8_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osCygwinW8.match(lines[0]):
|
|
|
|
osType = "Cygwin.W8"
|
2015-10-02 08:59:01 -05:00
|
|
|
elif osCygwinW10_64.match(lines[0]):
|
|
|
|
osType = "Cygwin.W10_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osCygwinW10.match(lines[0]):
|
|
|
|
osType = "Cygwin.W10"
|
2010-08-25 06:57:11 -05:00
|
|
|
else:
|
2014-07-13 06:14:49 -05:00
|
|
|
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
|
|
|
osType = uname.stdout.readlines()[0][:-1]
|
2010-08-25 06:57:11 -05:00
|
|
|
|
2014-12-09 16:49:46 -06:00
|
|
|
print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1]
|
|
|
|
print " (using: \"%s\")" % osType
|
2015-02-03 16:41:55 -06:00
|
|
|
ldLibraryPath = os.getenv('LD_LIBRARY_PATH')
|
2019-03-04 07:20:13 -06:00
|
|
|
if ldLibraryPath and 'devtoolset' in ldLibraryPath: useDevtoolset = False
|
2015-04-25 11:27:04 -05:00
|
|
|
|
|
|
|
if libDir == 'lib64' and not os.path.exists('/usr/lib64'):
|
|
|
|
libDir = 'lib'
|
2010-08-25 06:57:11 -05:00
|
|
|
|
2019-03-04 07:20:13 -06:00
|
|
|
return (osType,libDir,useDevtoolset)
|
2017-02-08 11:26:20 -06:00
|
|
|
|
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
def guessShell ():
|
|
|
|
# This environement variable cannot be trusted as it is set once when
|
|
|
|
# the user logs in. If aftewards it changes it that variable is *not*
|
|
|
|
# affected :-(.
|
|
|
|
#if os.environ.has_key('SHELL'): return os.environ['SHELL']
|
2017-02-08 11:26:20 -06:00
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
psCommand = subprocess.Popen ( ['ps', '-p', str(os.getppid()) ], stdout=subprocess.PIPE )
|
2017-08-02 04:41:08 -05:00
|
|
|
shell = psCommand.stdout.readlines()[1][:-1].split()[3].lstrip('-')
|
2017-04-14 05:09:48 -05:00
|
|
|
whichCommand = subprocess.Popen ( ['which', shell ], stdout=subprocess.PIPE )
|
|
|
|
shellPath = whichCommand.stdout.readlines()[0][:-1]
|
2017-02-08 11:26:20 -06:00
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
isBourneShell = True
|
|
|
|
cshBins = [ '/usr/bin/tcsh'
|
|
|
|
, '/bin/tcsh'
|
|
|
|
, '/usr/pkg/bin/tcsh'
|
|
|
|
, '/usr/local/bin/tcsh'
|
|
|
|
, '/usr/bin/csh'
|
|
|
|
, '/bin/csh'
|
|
|
|
, '/usr/pkg/bin/csh'
|
|
|
|
, '/usr/local/bin/csh'
|
|
|
|
]
|
|
|
|
if shellPath in cshBins: isBourneShell = False
|
|
|
|
#print 'GUESSED SHELL: "%s"' % shellPath
|
2017-02-08 11:26:20 -06:00
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
return shellPath, isBourneShell
|
2010-08-25 06:57:11 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
2019-03-04 07:20:13 -06:00
|
|
|
osType,libDir,useDevtoolset = guessOs()
|
2014-12-05 11:50:15 -06:00
|
|
|
buildType = "Release"
|
|
|
|
linkType = "Shared"
|
|
|
|
rootDir = None
|
2017-04-14 05:09:48 -05:00
|
|
|
shellBin, isBourneShell = guessShell()
|
2010-08-25 09:14:57 -05:00
|
|
|
|
|
|
|
parser = optparse.OptionParser ()
|
|
|
|
# Build relateds.
|
2015-05-09 16:11:44 -05:00
|
|
|
parser.add_option ( "--query-inst-root", action="store_true" , dest="queryInstRoot" )
|
|
|
|
parser.add_option ( "--query-isys-root", action="store_true" , dest="queryISysRoot" )
|
|
|
|
parser.add_option ( "--release" , action="store_true" , dest="release" )
|
|
|
|
parser.add_option ( "--debug" , action="store_true" , dest="debug" )
|
|
|
|
parser.add_option ( "--devel" , action="store_true" , dest="devel" )
|
|
|
|
parser.add_option ( "--static" , action="store_true" , dest="static" )
|
|
|
|
parser.add_option ( "--shared" , action="store_true" , dest="shared" )
|
|
|
|
parser.add_option ( "--no-python" , action="store_true" , dest="nopython" )
|
|
|
|
parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" )
|
2010-08-25 09:14:57 -05:00
|
|
|
( options, args ) = parser.parse_args ()
|
|
|
|
|
2017-02-08 11:26:20 -06:00
|
|
|
if options.release: buildType = "Release"
|
|
|
|
if options.debug: buildType = "Debug"
|
|
|
|
if options.devel: buildType = "Debug"
|
|
|
|
if options.static: linkType = "Static"
|
|
|
|
if options.shared: linkType = "Shared"
|
|
|
|
if options.rootDir: rootDir = options.rootDir
|
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
scriptPath = os.path.abspath(os.path.dirname(sys.argv[0]))
|
|
|
|
if 'Debug.' in scriptPath: buildType = 'Debug'
|
|
|
|
|
2017-02-08 11:26:20 -06:00
|
|
|
if not shellBin:
|
|
|
|
print 'echo "[ERROR] coriolisEnv.py was not able to guess/find the current shell interpeter."'
|
|
|
|
sys.exit( 1 )
|
2010-08-25 06:57:11 -05:00
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
strippedPath = scrubPath( "PATH" )
|
|
|
|
strippedLibraryPath = scrubPath( "LD_LIBRARY_PATH" )
|
|
|
|
strippedPythonPath = scrubPath( "PYTHONPATH" )
|
2010-08-25 06:57:11 -05:00
|
|
|
|
2012-11-16 06:46:27 -06:00
|
|
|
shellScriptSh = \
|
2014-12-05 11:50:15 -06:00
|
|
|
'echo "%(MESSAGE)s";' \
|
|
|
|
'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \
|
|
|
|
'PATH="%(PATH)s";' \
|
|
|
|
'BOOTSTRAP_TOP="%(BOOTSTRAP_TOP)s";' \
|
|
|
|
'CORIOLIS_TOP="%(CORIOLIS_TOP)s";' \
|
|
|
|
'export PATH BOOTSTRAP_TOP CORIOLIS_TOP STRATUS_MAPPING_NAME;'
|
2012-11-16 06:46:27 -06:00
|
|
|
|
2016-05-06 06:15:10 -05:00
|
|
|
# 'STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
|
|
|
|
|
2012-11-16 06:46:27 -06:00
|
|
|
shellScriptCsh = \
|
2014-12-05 11:50:15 -06:00
|
|
|
'echo "%(MESSAGE)s";' \
|
|
|
|
'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \
|
|
|
|
'setenv PATH "%(PATH)s";' \
|
|
|
|
'setenv BOOTSTRAP_TOP "%(BOOTSTRAP_TOP)s";' \
|
2016-05-06 06:15:10 -05:00
|
|
|
'setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";'
|
|
|
|
|
|
|
|
# 'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
|
2012-11-16 06:46:27 -06:00
|
|
|
|
2019-03-04 07:20:13 -06:00
|
|
|
reDevtoolset = re.compile( r'/opt/rh/devtoolset-(?P<version>\d+)/root/etc/coriolis2.*' )
|
|
|
|
|
2012-11-16 06:46:27 -06:00
|
|
|
buildDir = buildType + "." + linkType
|
|
|
|
scriptDir = os.path.dirname ( os.path.abspath(__file__) )
|
|
|
|
#print "echo \"Script Location: %s\";" % scriptDir,
|
|
|
|
if scriptDir.startswith("/etc/coriolis2"):
|
|
|
|
coriolisTop = "/usr"
|
|
|
|
sysconfDir = scriptDir
|
|
|
|
shellMessage = "Using system-wide Coriolis 2 (/usr)"
|
2019-03-04 16:25:25 -06:00
|
|
|
else:
|
2019-03-04 07:20:13 -06:00
|
|
|
m = reDevtoolset.match( scriptDir )
|
|
|
|
if m:
|
|
|
|
coriolisTop = "/opt/rh/devtoolset-%d/root/usr" % m.group('version')
|
|
|
|
sysconfDir = scriptDir
|
|
|
|
shellMessage = "Using system-wide devtoolset-%(v)d Coriolis 2 (/opt/rh/devtoolset-%(v)d/root/usr)" \
|
2019-03-04 16:25:25 -06:00
|
|
|
% { 'v':m.group('version') }
|
2019-03-04 07:20:13 -06:00
|
|
|
elif scriptDir.startswith(os.getenv("HOME")+"/nightly/coriolis-2.x/"):
|
|
|
|
rootDir = os.getenv("HOME") + "/nightly/coriolis-2.x"
|
|
|
|
coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir )
|
|
|
|
sysconfDir = scriptDir
|
|
|
|
shellMessage = "Using Nightly build Coriolis 2 (%s)" % coriolisTop
|
|
|
|
elif scriptDir.startswith("/users/outil/coriolis/coriolis-2.x/") \
|
|
|
|
or scriptDir.startswith("/soc/coriolis2/"):
|
|
|
|
coriolisTop = "/soc/coriolis2"
|
|
|
|
sysconfDir = coriolisTop + "/etc/coriolis2"
|
|
|
|
shellMessage = "Using SoC network-wide Coriolis 2 (/soc/coriolis2)"
|
|
|
|
else:
|
|
|
|
if not rootDir:
|
|
|
|
rootDir = os.getenv("HOME") + "/coriolis-2.x"
|
|
|
|
coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir )
|
|
|
|
sysconfDir = coriolisTop + "/etc/coriolis2"
|
|
|
|
shellMessage = "Using user-selected Coriolis 2 (%s)" % rootDir
|
2012-11-16 06:46:27 -06:00
|
|
|
|
Support for Windows/Cygwin, part 2.
* Change: In bootstrap, in ccb, builder and coriolisEnv.py, correct detection
of the windows architecture (32 or 64 bits). Under Cygwin, add the
directory of the dll into the PATH also. Uses "site-package" as the
location of Python modules (*not* "dist-package").
Use gnu++0x under Cygwin instead of c++11.
* Change: In Etesian, if Coloquinte is not found, do not stop the compilation,
just disable the tool altogether.
* Change: In Hurricane, In Backtrace, disable backtrace under Cygwin as it
uses features specific of the glibc.
* Change: In Knik, use HUGE_VAL instead of HUGE (not present under Cygwin),
add the <cmath> header.
* Change: In Unicorn, Coloquinte no longer stops the compilation.
2014-07-22 17:55:50 -05:00
|
|
|
if osType.startswith("Cygwin"):
|
|
|
|
strippedPath = "%s/%s:%s" % ( coriolisTop, libDir, strippedPath )
|
|
|
|
|
2012-11-16 06:46:27 -06:00
|
|
|
absLibDir = "%s/%s" % ( coriolisTop, libDir )
|
|
|
|
strippedPath = "%s/bin:%s" % ( coriolisTop, strippedPath )
|
|
|
|
strippedLibraryPath = "%s:%s" % ( absLibDir , strippedLibraryPath )
|
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
if not os.path.exists(coriolisTop):
|
|
|
|
print 'echo "[ERROR] coriolisEnv.py, top directory <%s> do not exists."' % coriolisTop
|
|
|
|
sys.exit( 1 )
|
|
|
|
|
2012-11-16 06:46:27 -06:00
|
|
|
if not options.nopython:
|
|
|
|
pyVersion = sys.version_info
|
|
|
|
version = "%d.%d" % (pyVersion[0],pyVersion[1])
|
2020-02-08 17:47:11 -06:00
|
|
|
#if osType.startswith("Linux.SL") \
|
|
|
|
# or osType.startswith("Linux.sl") \
|
|
|
|
# or osType.startswith("Linux.el") \
|
|
|
|
# or osType.startswith("Linux.fc") \
|
|
|
|
# or osType.startswith("Cygwin"):
|
|
|
|
# sitePackagesDir = "%s/python%s/site-packages" % (absLibDir,version)
|
|
|
|
#elif osType.startswith("Darwin"):
|
|
|
|
# sitePackagesDir = "%s/%s/site-packages" % (absLibDir,version)
|
|
|
|
#else:
|
|
|
|
# sitePackagesDir = "%s/python%s/dist-packages" % (absLibDir,version)
|
|
|
|
|
|
|
|
sitePackagesDir = "sitePackageDir_has_been_not_found"
|
|
|
|
for pyPackageDir in [ "%s/python%s/site-packages" % (absLibDir,version)
|
|
|
|
, "%s/python%s/dist-packages" % (absLibDir,version)
|
|
|
|
, "%s/%s/site-packages" % (absLibDir,version)
|
|
|
|
]:
|
|
|
|
if os.path.isdir(pyPackageDir):
|
|
|
|
sitePackagesDir = pyPackageDir
|
|
|
|
break
|
2012-11-16 06:46:27 -06:00
|
|
|
|
2014-09-07 16:16:04 -05:00
|
|
|
strippedPythonPath = "%s:" % (sitePackagesDir) + strippedPythonPath
|
|
|
|
strippedPythonPath = "%s/crlcore:" % (sitePackagesDir) + strippedPythonPath
|
|
|
|
strippedPythonPath = "%s/cumulus:" % (sitePackagesDir) + strippedPythonPath
|
|
|
|
strippedPythonPath = "%s/cumulus/plugins:" % (sitePackagesDir) + strippedPythonPath
|
|
|
|
strippedPythonPath = "%s/stratus:" % (sitePackagesDir) + strippedPythonPath
|
Migrating the initialisation system to be completely Python-like.
* New: In bootstrap/coriolisEnv.py, add the "etc" directory to the
PYTHONPATH as initialization are now Python modules.
* New: In Hurricane/analogic, first groundwork for the integration of
PIP/MIM/MOM multi-capacitors. Add C++ and Python interface for the
allocation matrix and the list of capacities values.
* Change: In Hurricane::RegularLayer, add a layer parameter to the
constructor so the association between the RegularLayer and it's
BasicLayer can readily be done.
* Change: In Hurricane::Layer, add a new getCut() accessor to get the
cut layer in ViaLayer.
* Change: In Hurricane::DataBase::get(), the Python wrapper should no
longer consider an error if the data-base has not been created yet.
Just return None.
* Bug: In Isobar::PyLayer::getEnclosure() wrapper, if the overall
enclosure is requested, pass the right parameter to the C++ function.
* Change: In AllianceFramework, make public _bindLibraries() and export
it to the Python interface.
* Change: In AllianceFramework::create(), do not longer call bindLibraries().
This now must be done explicitely and afterwards.
* Change: In AllianceFramework::createLibrary() and
Environement::addSYSTEM_LIBRARY(), minor bug corrections that I don't
recall.
* Change: In SearchPath::prepend(), set the selected index to zero and
return it.
* Change: In CRL::System CTOR, add "etc" to the PYTHONPATH as the
configuration files are now organized as Python modules.
* New: In PyCRL, export the CRL::System singleton, it's creation is no
longer triggered by the one of AllianceFramework.
* New: In CRL/etc/, convert most of the configuration files into the
Python module format. For now, keep the old ".conf", but that are no
longer used.
For the real technologies, we cannot keep the directory name as
"180" or "45" as it not allowed by Python syntax, so we create "node180"
or "node45" instead.
Most of the helpers and coriolisInit.py are no longer used now.
To be removed in future commits after being sure that everything
works...
* Bug: In AutoSegment::makeDogleg(AutoContact*), the layer of the contacts
where badly computed when one end of the original segment was attached
to a non-preferred direction segment (mostly on terminal contacts).
Now use the new AutoContact::updateLayer() method.
* Bug: In Dijkstra::load(), limit symetric search area only if the net
is a symmetric one !
* Change: In Katana/python/katanaInit.py, comply with the new initialisation
scheme.
* Change: In Unicorn/cgt.py, comply to the new inititalization scheme.
* Change: In cumulus various Python scripts remove the call to
helpers.staticInitialization() as they are not needed now (we run in
only *one* interpreter, so we correctly share all init).
In plugins/__init__.py, read the new NDA directory variable.
* Bug: In cumulus/plugins/Chip.doCoronafloorplan(), self.railsNb was not
correctly managed when there was no clock.
* Change: In cumulus/plugins/Configuration.coronaContactArray(), compute
the viaPitch from the technology instead of the hard-coded 4.0 lambdas.
In Configuration.loadConfiguration(), read the "ioring.py" from
the new user's settings module.
* Bug: In stratus.dpgen_ADSB2F, gives coordinates translated into DbU to
the XY functions.
In st_model.Save(), use the VstUseConcat flag to get correct VST files.
In st_net.hur_net(), when a net is POWER/GROUND or CLOCK also make it
global.
* Change: In Oroshi/python/WIP_Transistor.py, encapsulate the generator
inside a try/except block to get prettier error (and stop at the first).
2019-10-28 12:09:14 -05:00
|
|
|
strippedPythonPath = "%s:" % (sysconfDir) + strippedPythonPath
|
2012-11-16 06:46:27 -06:00
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
shellScriptSh += 'PYTHONPATH="%(PYTHONPATH)s";' \
|
|
|
|
'export PYTHONPATH;'
|
2014-05-13 10:13:55 -05:00
|
|
|
shellScriptCsh += 'setenv PYTHONPATH "%(PYTHONPATH)s";'
|
2012-11-16 06:46:27 -06:00
|
|
|
|
2013-04-26 10:32:59 -05:00
|
|
|
if osType == "Darwin":
|
2014-12-05 11:50:15 -06:00
|
|
|
shellScriptSh += 'DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \
|
|
|
|
'export DYLD_LIBRARY_PATH;'
|
2017-02-08 11:26:20 -06:00
|
|
|
shellScriptCsh += 'setenv DYLD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";'
|
2013-04-26 10:32:59 -05:00
|
|
|
else:
|
2014-12-05 11:50:15 -06:00
|
|
|
shellScriptSh += 'LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \
|
|
|
|
'export LD_LIBRARY_PATH;'
|
2017-02-08 11:26:20 -06:00
|
|
|
shellScriptCsh += 'setenv LD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";'
|
2014-05-13 10:13:55 -05:00
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
shellScriptSh += "hash -r;"
|
|
|
|
shellScriptCsh += "rehash;"
|
2013-04-26 10:32:59 -05:00
|
|
|
|
2017-04-14 05:09:48 -05:00
|
|
|
if isBourneShell: shellScript = shellScriptSh
|
|
|
|
else: shellScript = shellScriptCsh
|
2012-11-16 06:46:27 -06:00
|
|
|
|
2019-03-04 07:20:13 -06:00
|
|
|
if useDevtoolset:
|
2017-04-14 05:09:48 -05:00
|
|
|
shellScript += \
|
2019-03-04 07:20:13 -06:00
|
|
|
' echo "Launching a devtoolset-8 subshell though scl (CTRL+D to exit).";' \
|
|
|
|
' scl enable devtoolset-8 %(SHELL)s'
|
2017-02-08 11:26:20 -06:00
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
evalScript = shellScript % { "PATH" : strippedPath
|
|
|
|
, "LD_LIBRARY_PATH" : strippedLibraryPath
|
|
|
|
, "PYTHONPATH" : strippedPythonPath
|
|
|
|
, "BOOTSTRAP_TOP" : coriolisTop
|
|
|
|
, "CORIOLIS_TOP" : coriolisTop
|
|
|
|
, "SYSCONF_DIR" : sysconfDir
|
|
|
|
, "MESSAGE" : shellMessage
|
|
|
|
, "buildDir" : buildDir
|
2017-02-08 11:26:20 -06:00
|
|
|
, 'SHELL' : shellBin
|
2014-12-05 11:50:15 -06:00
|
|
|
}
|
2015-05-09 16:11:44 -05:00
|
|
|
if options.queryISysRoot:
|
|
|
|
print '%s/%s' % (rootDir,osType)
|
|
|
|
sys.exit( 0 )
|
|
|
|
|
|
|
|
if options.queryInstRoot:
|
|
|
|
print coriolisTop
|
|
|
|
sys.exit( 0 )
|
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
print evalScript
|
2017-02-08 11:26:20 -06:00
|
|
|
sys.exit( 0 )
|