mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-29 01:14:35 +02:00
Manual merge of remaining files from lightwave-lab:pymod-test to pymod
git merge failed, probably because there were two parallel attempts to merge master into pymod leading to opposite resolutions.
This commit is contained in:
+6
-6
@@ -31,7 +31,7 @@ Also by default, supported script languages, i.e, Ruby and Python, are those sta
|
||||
You may want to use a non-OS-standard script language such as Python 3.6 from Anaconda2 (https://www.anaconda.com/download/#macos) in combination with KLayout.
|
||||
|
||||
Since Anaconda2 is a popular Python development environment, this is worth trying. Unfortunately, however, some dynamic linkage problems are observed as of today.
|
||||
On the other hand, Python 3.6 provided by MacPorts or Homebrew is usable.
|
||||
On the other hand, Python 3.7 provided by MacPorts or Homebrew is usable.
|
||||
Please try this (refer to 3B below or Section #5) if you feel it's useful.
|
||||
|
||||
# 3. Use-cases
|
||||
@@ -90,20 +90,20 @@ $ ./makeDMG4mac.py -p qt5.pkg.macos-HighSierra-release -m
|
||||
|
||||
|
||||
# 5. Alternative building options
|
||||
### 5.1 Python 3.6 from Homebrew, Qt 5.10.1 from Homebrew
|
||||
### 5.1 Python 3.7 from Homebrew, Qt 5.10.1 from Homebrew
|
||||
|
||||
Homebrew's installation of python3 (`brew install python3`) places a `Python.framework` in `/usr/local/opt/python/Frameworks/Python.framework/`, which you can use to build KLayout from. Qt can also be downloaded from brew with `brew install qt`.
|
||||
|
||||
```
|
||||
# Build step
|
||||
./build4mac.py -p B36 -q Qt5Brew
|
||||
./build4mac.py -p B37 -q Qt5Brew
|
||||
# build with log
|
||||
./build4mac.py -p B36 -q Qt5Brew 2>&1 | tee qt5.build.macos-HighSierra-release-version.log
|
||||
./build4mac.py -p B37 -q Qt5Brew 2>&1 | tee qt5.build.macos-HighSierra-release-version.log
|
||||
|
||||
|
||||
# Deploy step
|
||||
./build4mac.py -p B36 -q Qt5Brew -y # normal deploy
|
||||
./build4mac.py -p B36 -q Qt5Brew -y -v 3 2>&1 | tee qt5.pkg.macos-HighSierra-release.log # deploy with debug options
|
||||
./build4mac.py -p B37 -q Qt5Brew -y # normal deploy
|
||||
./build4mac.py -p B37 -q Qt5Brew -y -v 3 2>&1 | tee qt5.pkg.macos-HighSierra-release.log # deploy with debug options
|
||||
|
||||
# Packaging step
|
||||
./makeDMG4mac.py -p qt5.pkg.macos-HighSierra-release -m -q Qt5101
|
||||
|
||||
Binary file not shown.
@@ -67,7 +67,7 @@ def SetGlobals():
|
||||
Usage += " : Refer to 'macbuild/build4mac_env.py' for details | \n"
|
||||
Usage += " [-q|--qt <type>] : type=['Qt4MacPorts', 'Qt5MacPorts', 'Qt5Brew'] | qt5macports \n"
|
||||
Usage += " [-r|--ruby <type>] : type=['nil', 'Sys', 'Src24', 'MP24', 'B25'] | sys \n"
|
||||
Usage += " [-p|--python <type>] : type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36', 'B36'] | sys \n"
|
||||
Usage += " [-p|--python <type>] : type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36', 'B37'] | sys \n"
|
||||
Usage += " [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled \n"
|
||||
Usage += " [-m|--make <option>] : option passed to 'make' | -j4 \n"
|
||||
Usage += " [-d|--debug] : enable debug mode build | disabled \n"
|
||||
@@ -175,7 +175,7 @@ def ParseCommandLineArguments():
|
||||
|
||||
p.add_option( '-p', '--python',
|
||||
dest='type_python',
|
||||
help="Python type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36']" )
|
||||
help="Python type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36', 'B37']" )
|
||||
|
||||
p.add_option( '-n', '--noqtbinding',
|
||||
action='store_true',
|
||||
@@ -294,7 +294,7 @@ def ParseCommandLineArguments():
|
||||
exit()
|
||||
|
||||
# Determine Python type
|
||||
candidates = [ i.upper() for i in ['nil', 'Sys', 'Ana27', 'Ana36', 'MP36', 'B36'] ]
|
||||
candidates = [ i.upper() for i in ['nil', 'Sys', 'Ana27', 'Ana36', 'MP36', 'B37'] ]
|
||||
ModulePython = ""
|
||||
index = 0
|
||||
for item in candidates:
|
||||
@@ -324,7 +324,7 @@ def ParseCommandLineArguments():
|
||||
ModulePython = 'Python36MacPorts'
|
||||
NonOSStdLang = True
|
||||
elif index == 5:
|
||||
ModulePython = 'Python36Brew'
|
||||
ModulePython = 'Python37Brew'
|
||||
NonOSStdLang = True
|
||||
else:
|
||||
index += 1
|
||||
@@ -765,12 +765,12 @@ def DeployBinariesForBundle():
|
||||
|
||||
deploymentPython = True
|
||||
if deploymentPython and NonOSStdLang:
|
||||
from build4mac_util import WalkFrameworkPaths, PerformChanges, DetectChanges
|
||||
from build4mac_util import WalkFrameworkPaths, PerformChanges
|
||||
|
||||
bundlePath = AbsMacPkgDir + '/klayout.app'
|
||||
# bundlePath = os.getcwd() + '/qt5.pkg.macos-HighSierra-release/klayout.app'
|
||||
bundleExecPathAbs = '%s/Contents/MacOS/' % bundlePath
|
||||
pythonOriginalFrameworkPath = '/usr/local/opt/python3/Frameworks/Python.framework'
|
||||
pythonOriginalFrameworkPath = '/usr/local/opt/python/Frameworks/Python.framework'
|
||||
pythonFrameworkPath = '%s/Contents/Frameworks/Python.framework' % bundlePath
|
||||
|
||||
print(" [8.1] Deploying Python from %s ..." % pythonOriginalFrameworkPath)
|
||||
@@ -1012,8 +1012,6 @@ def main():
|
||||
|
||||
if not ret2 == 0:
|
||||
sys.exit(1)
|
||||
else:
|
||||
sys.exit(0)
|
||||
|
||||
#===================================================================================
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -126,7 +126,7 @@ RubyDictionary = { 'nil' : None,
|
||||
# [3] Python
|
||||
#-----------------------------------------------------
|
||||
Pythons = [ 'nil', 'PythonYosemite', 'PythonElCapitan', 'PythonSierra', 'PythonHighSierra' ]
|
||||
Pythons += [ 'Anaconda27', 'Anaconda36', 'Python36MacPorts', 'Python36Brew' ]
|
||||
Pythons += [ 'Anaconda27', 'Anaconda36', 'Python36MacPorts', 'Python37Brew' ]
|
||||
|
||||
#-----------------------------------------------------
|
||||
# Whereabout of different components of Python
|
||||
@@ -188,11 +188,11 @@ Python36MacPorts= { 'exe': '/opt/local/Library/Frameworks/Python.framework/Versi
|
||||
'lib': '/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6m.dylib'
|
||||
}
|
||||
|
||||
# Python 3.6 from Brew *+*+*+ EXPERIMENTAL *+*+*+
|
||||
# Python 3.7 from Brew *+*+*+ EXPERIMENTAL *+*+*+
|
||||
# [Key Type Name] = 'pybrew'
|
||||
Python36Brew= { 'exe': '/usr/local/opt/python/libexec/bin/python' ,
|
||||
'inc': '/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/Headers',
|
||||
'lib': '/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/Python'
|
||||
Python37Brew= { 'exe': '/usr/local/opt/python/libexec/bin/python' ,
|
||||
'inc': '/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Headers',
|
||||
'lib': '/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python'
|
||||
}
|
||||
|
||||
# Consolidated dictionary kit for Python
|
||||
@@ -204,7 +204,7 @@ PythonDictionary= { 'nil' : None,
|
||||
'Anaconda27' : Anaconda27,
|
||||
'Anaconda36' : Anaconda36,
|
||||
'Python36MacPorts': Python36MacPorts,
|
||||
'Python36Brew' : Python36Brew,
|
||||
'Python37Brew' : Python37Brew,
|
||||
}
|
||||
|
||||
#-----------------------------------------------------
|
||||
|
||||
@@ -361,7 +361,7 @@ def MakeTargetDMGFile(msg=""):
|
||||
# (4) Mount the DMG
|
||||
#--------------------------------------------------------
|
||||
print( ">>> (4) Mounting <%s> to <%s>" % (WorkDMG, MountDir ) )
|
||||
command1 = "hdiutil attach %s -readwrite -noverify -noautoopen -quiet" % WorkDMG
|
||||
command1 = "hdiutil attach %s -readwrite -noverify -quiet -noautoopen" % WorkDMG
|
||||
os.system(command1)
|
||||
|
||||
command2 = "hdiutil info | grep %s | grep \"/dev/\" | awk '{print $1}'" % VolumeDMG
|
||||
|
||||
Reference in New Issue
Block a user