mirror of https://github.com/KLayout/klayout.git
python fully embedded into bundle. wonder if it is useful.
This commit is contained in:
parent
2598f28e69
commit
ea8aa5f99f
|
|
@ -237,7 +237,8 @@ def WalkDictTree(dependencyDict, visited_files):
|
|||
dependency_list.append(str(next(iter(deplib))))
|
||||
libNameChanges.extend(WalkDictTree(deplib, visited_files))
|
||||
else:
|
||||
raise RuntimeError("Unexpected value: %s, %s" % (deplib, dependencies))
|
||||
#raise RuntimeError("Unexpected value: %s" % deplib)
|
||||
pass
|
||||
else:
|
||||
raise RuntimeError("Unexpected value: %s" % dependencies)
|
||||
if len(dependency_list) > 0:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env python3
|
||||
import pprint
|
||||
import os
|
||||
from macbuild.build4mac_util import WalkFrameworkPaths, PerformChanges, DetectChanges
|
||||
|
||||
bundlePath = 'qt5.pkg.macos-HighSierra-release/klayout.app'
|
||||
bundleExecPathAbs = os.getcwd() + '/%s/Contents/MacOS/' % bundlePath
|
||||
|
||||
# rsync -a --safe-links /usr/local/opt/python/Frameworks/Python.framework/ qt5.pkg.macos-HighSierra-release/klayout.app/Contents/Frameworks/Python.framework
|
||||
# cp -RL /usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages qt5.pkg.macos-HighSierra-release/klayout.app/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/
|
||||
# rm -rf qt5.pkg.macos-HighSierra-release/klayout.app/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/test
|
||||
|
||||
pythonFrameworkPath = '%s/Contents/Frameworks/Python.framework' % bundlePath
|
||||
depdict = WalkFrameworkPaths(pythonFrameworkPath)
|
||||
# pp = pprint.PrettyPrinter(indent=1)
|
||||
# pp.pprint(depdict)
|
||||
|
||||
pythonOriginalFrameworkPath = '/usr/local/opt/python/Frameworks/Python.framework'
|
||||
appPythonFrameworkPath = '@executable_path/../Frameworks/Python.framework/'
|
||||
PerformChanges(depdict, [(pythonOriginalFrameworkPath, appPythonFrameworkPath)], bundleExecPathAbs)
|
||||
|
||||
klayoutPath = bundleExecPathAbs
|
||||
depdict = WalkFrameworkPaths(klayoutPath, filter_regex=r'klayout$')
|
||||
PerformChanges(depdict, [(pythonOriginalFrameworkPath, appPythonFrameworkPath)], bundleExecPathAbs)
|
||||
|
||||
klayoutPath = bundleExecPathAbs + '../Frameworks'
|
||||
depdict = WalkFrameworkPaths(klayoutPath, filter_regex=r'libklayout')
|
||||
PerformChanges(depdict, [(pythonOriginalFrameworkPath, appPythonFrameworkPath)], bundleExecPathAbs)
|
||||
|
||||
|
||||
usrLocalPath = '/usr/local/opt/'
|
||||
appUsrLocalPath = '@executable_path/../Frameworks/'
|
||||
depdict = WalkFrameworkPaths(pythonFrameworkPath)
|
||||
PerformChanges(depdict, [(usrLocalPath, appUsrLocalPath)], bundleExecPathAbs)
|
||||
|
||||
# usrLocalPath = '/usr/local/lib/'
|
||||
# appUsrLocalPath = '@executable_path/../Frameworks/'
|
||||
# depdict = WalkFrameworkPaths(pythonFrameworkPath)
|
||||
# PerformChanges(depdict, [(usrLocalPath, appUsrLocalPath)], bundleExecPathAbs)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue