Updating socInstaller.py for docker cases.
* New: In bootstrap/socInstaller.py, partial redesign of group of commands to better handles all the cases. Added support for docker context, and added Alliance compilation "alongside" Coriolis (merged install tree). * Change: In bootstrap/coriolisEnv.py, when run in a docker container we no longer can trust the kernel name to guess the OS, as the kernel is the one of the host and not the docker guest. This was causing problem for determining the Python site-package directory. Now just check all possible locations and stop at the first directory found.
This commit is contained in:
parent
0dc98dfce3
commit
2f81f454e6
|
@ -130,7 +130,6 @@ def guessOs ():
|
|||
|
||||
print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1]
|
||||
print " (using: \"%s\")" % osType
|
||||
|
||||
ldLibraryPath = os.getenv('LD_LIBRARY_PATH')
|
||||
if ldLibraryPath and 'devtoolset' in ldLibraryPath: useDevtoolset = False
|
||||
|
||||
|
@ -273,16 +272,25 @@ if __name__ == "__main__":
|
|||
if not options.nopython:
|
||||
pyVersion = sys.version_info
|
||||
version = "%d.%d" % (pyVersion[0],pyVersion[1])
|
||||
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)
|
||||
#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
|
||||
|
||||
strippedPythonPath = "%s:" % (sitePackagesDir) + strippedPythonPath
|
||||
strippedPythonPath = "%s/crlcore:" % (sitePackagesDir) + strippedPythonPath
|
||||
|
|
Loading…
Reference in New Issue