Merge remote-tracking branch 'origin/macos-build' into macos-build

This commit is contained in:
Matthias Koefferlein 2018-01-07 11:24:54 -08:00
commit 02f84181f5
6 changed files with 125 additions and 59 deletions

View File

@ -3,7 +3,7 @@
# File: KLayoutEditor.sh # File: KLayoutEditor.sh
# #
# Descriptions: # Descriptions:
# This is to invoke "klayout" distributed as a binary package for Mac # This is to invoke "klayout" with Qt5 distributed as a binary package for Mac
# in "editor" mode. # in "editor" mode.
# #
# You may specify style and other options as you like by setting # You may specify style and other options as you like by setting
@ -19,7 +19,7 @@ myKLayout="open -n -a /Applications/klayout.app --args "
# Pass command line parameters to klayout # Pass command line parameters to klayout
# vvvvvvvvvv You may edit the block below vvvvvvvvvv # vvvvvvvvvv You may edit the block below vvvvvvvvvv
opt_mode="-e" opt_mode="-e"
opt_style="-style=cleanlooks" opt_style="-style=fusion"
opt_others="" opt_others=""
# ^^^^^^^^^^ You may edit the block above ^^^^^^^^^^ # ^^^^^^^^^^ You may edit the block above ^^^^^^^^^^
#=================================================== #===================================================

View File

@ -3,7 +3,7 @@
# File: KLayoutViewer.sh # File: KLayoutViewer.sh
# #
# Descriptions: # Descriptions:
# This is to invoke "klayout" distributed as a binary package for Mac # This is to invoke "klayout" with Qt5 distributed as a binary package for Mac
# in "viewer" mode. # in "viewer" mode.
# #
# You may specify style and other options as you like by setting # You may specify style and other options as you like by setting
@ -19,7 +19,7 @@ myKLayout="open -n -a /Applications/klayout.app --args "
# Pass command line parameters to klayout # Pass command line parameters to klayout
# vvvvvvvvvv You may edit the block below vvvvvvvvvv # vvvvvvvvvv You may edit the block below vvvvvvvvvv
opt_mode="-ne" opt_mode="-ne"
opt_style="-style=motif" opt_style="-style=windows"
opt_others="" opt_others=""
# ^^^^^^^^^^ You may edit the block above ^^^^^^^^^^ # ^^^^^^^^^^ You may edit the block above ^^^^^^^^^^
#=================================================== #===================================================

View File

@ -40,6 +40,7 @@ def SetGlobals():
global DebugMode # True if debug mode build global DebugMode # True if debug mode build
global CheckComOnly # True if only for checking the command line parameters to "build.sh" global CheckComOnly # True if only for checking the command line parameters to "build.sh"
global Deployment # True if deploying the binaries for a package global Deployment # True if deploying the binaries for a package
global DeployVerbose # -verbose=<0-3> level passed to 'macdeployqt' tool
global Version # KLayout's version global Version # KLayout's version
# auxiliary variables on platform # auxiliary variables on platform
global System # 6-tuple from platform.uname() global System # 6-tuple from platform.uname()
@ -61,9 +62,10 @@ def SetGlobals():
Usage += " : * key type names below are case insensitive * | \n" Usage += " : * key type names below are case insensitive * | \n"
Usage += " : 'nil' = not to support the script language | \n" Usage += " : 'nil' = not to support the script language | \n"
Usage += " : 'Sys' = using the OS standard script language | \n" Usage += " : 'Sys' = using the OS standard script language | \n"
Usage += " : Refer to 'macbuild/build4mac_env.py' for details| \n"
Usage += " [-q|--qt <type>] : type=['Qt4MacPorts', 'Qt5MacPorts'] | qt5macports \n" Usage += " [-q|--qt <type>] : type=['Qt4MacPorts', 'Qt5MacPorts'] | qt5macports \n"
Usage += " [-r|--ruby <type>] : type=['nil', 'Sys', 'RubySource'] | sys \n" Usage += " [-r|--ruby <type>] : type=['nil', 'Sys', 'Src24', 'MP24'] | sys \n"
Usage += " [-p|--python <type>] : type=['nil', 'Sys', 'Anaconda27', 'Anaconda36'] | sys \n" Usage += " [-p|--python <type>] : type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36'] | sys \n"
Usage += " [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled \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 += " [-m|--make <option>] : option passed to 'make' | -j4 \n"
Usage += " [-d|--debug] : enable debug mode build | disabled \n" Usage += " [-d|--debug] : enable debug mode build | disabled \n"
@ -72,7 +74,11 @@ def SetGlobals():
Usage += " : ! After confirmation of successful build of | \n" Usage += " : ! After confirmation of successful build of | \n"
Usage += " : KLayout, rerun this script with BOTH: | \n" Usage += " : KLayout, rerun this script with BOTH: | \n"
Usage += " : 1) the same options used for building AND | \n" Usage += " : 1) the same options used for building AND | \n"
Usage += " : 2) [-y|--deploy] | \n" Usage += " : 2) <-y|--deploy> | \n"
Usage += " : optionally with [-v|--verbose <0-3>] | \n"
Usage += " [-v|--verbose <0-3>] : verbose level of `macdeployqt' | 1 \n"
Usage += " : 0 = no output, 1 = error/warning (default), | \n"
Usage += " : 2 = normal, 3 = debug | \n"
Usage += " [-?|--?] : print this usage and exit | disabled \n" Usage += " [-?|--?] : print this usage and exit | disabled \n"
Usage += "---------------------------------------------------------------------------------------------\n" Usage += "---------------------------------------------------------------------------------------------\n"
@ -131,6 +137,7 @@ def SetGlobals():
DebugMode = False DebugMode = False
CheckComOnly = False CheckComOnly = False
Deployment = False Deployment = False
DeployVerbose = 1
Version = GetKLayoutVersionFrom( "./version.sh" ) Version = GetKLayoutVersionFrom( "./version.sh" )
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -147,6 +154,7 @@ def ParseCommandLineArguments():
global DebugMode global DebugMode
global CheckComOnly global CheckComOnly
global Deployment global Deployment
global DeployVerbose
p = optparse.OptionParser( usage=Usage ) p = optparse.OptionParser( usage=Usage )
p.add_option( '-q', '--qt', p.add_option( '-q', '--qt',
@ -155,11 +163,11 @@ def ParseCommandLineArguments():
p.add_option( '-r', '--ruby', p.add_option( '-r', '--ruby',
dest='type_ruby', dest='type_ruby',
help="Ruby type=['nil', 'Sys', 'RubySource']" ) help="Ruby type=['nil', 'Sys', 'Src24', 'MP24']" )
p.add_option( '-p', '--python', p.add_option( '-p', '--python',
dest='type_python', dest='type_python',
help="Python type=['nil', 'Sys', 'Anaconda27', 'Anaconda36']" ) help="Python type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36']" )
p.add_option( '-n', '--noqtbinding', p.add_option( '-n', '--noqtbinding',
action='store_true', action='store_true',
@ -189,6 +197,10 @@ def ParseCommandLineArguments():
default=False, default=False,
help="deploy built binaries" ) help="deploy built binaries" )
p.add_option( '-v', '--verbose',
dest='deploy_verbose',
help="verbose level of `macdeployqt` tool" )
p.add_option( '-?', '--??', p.add_option( '-?', '--??',
action='store_true', action='store_true',
dest='checkusage', dest='checkusage',
@ -203,6 +215,7 @@ def ParseCommandLineArguments():
debug_build = False, debug_build = False,
check_command = False, check_command = False,
deploy_bins = False, deploy_bins = False,
deploy_verbose = "1",
checkusage = False ) checkusage = False )
opt, args = p.parse_args() opt, args = p.parse_args()
@ -231,7 +244,7 @@ def ParseCommandLineArguments():
quit() quit()
# Determine Ruby type # Determine Ruby type
candidates = [ i.upper() for i in ['nil', 'Sys', 'RubySource'] ] candidates = [ i.upper() for i in ['nil', 'Sys', 'Src24', 'MP24'] ]
ModuleRuby = "" ModuleRuby = ""
index = 0 index = 0
for item in candidates: for item in candidates:
@ -253,6 +266,8 @@ def ParseCommandLineArguments():
break break
elif index == 2: elif index == 2:
ModuleRuby = 'Ruby24SrcBuild' ModuleRuby = 'Ruby24SrcBuild'
elif index == 3:
ModuleRuby = 'Ruby24MacPorts'
else: else:
index += 1 index += 1
if ModuleRuby == "": if ModuleRuby == "":
@ -262,7 +277,7 @@ def ParseCommandLineArguments():
quit() quit()
# Determine Python type # Determine Python type
candidates = [ i.upper() for i in ['nil', 'Sys', 'Anaconda27', 'Anaconda36'] ] candidates = [ i.upper() for i in ['nil', 'Sys', 'Ana27', 'Ana36', 'MP36'] ]
ModulePython = "" ModulePython = ""
index = 0 index = 0
for item in candidates: for item in candidates:
@ -286,6 +301,8 @@ def ParseCommandLineArguments():
ModulePython = 'Anaconda27' ModulePython = 'Anaconda27'
elif index == 3: elif index == 3:
ModulePython = 'Anaconda36' ModulePython = 'Anaconda36'
elif index == 4:
ModulePython = 'Python36MacPorts'
else: else:
index += 1 index += 1
if ModulePython == "": if ModulePython == "":
@ -299,6 +316,12 @@ def ParseCommandLineArguments():
DebugMode = opt.debug_build DebugMode = opt.debug_build
CheckComOnly = opt.check_command CheckComOnly = opt.check_command
Deployment = opt.deploy_bins Deployment = opt.deploy_bins
DeployVerbose = int(opt.deploy_verbose)
if not DeployVerbose in [0, 1, 2, 3]:
print("")
print( "!!! Unsupported verbose level passed to `macdeployqt` tool", file=sys.stderr )
print(Usage)
quit()
if not Deployment: if not Deployment:
target = "%s %s %s" % (Platform, Release, Machine) target = "%s %s %s" % (Platform, Release, Machine)
@ -454,6 +477,7 @@ def DeployBinariesForBundle():
global AbsMacBuildDir global AbsMacBuildDir
global AbsMacBuildLog global AbsMacBuildLog
global Version global Version
global DeployVerbose
print("") print("")
print( "##### Started deploying libraries and executables for <klayout.app> #####" ) print( "##### Started deploying libraries and executables for <klayout.app> #####" )
@ -488,7 +512,7 @@ def DeployBinariesForBundle():
print( " [3] Creating the standard directory structure for 'klayout.app' bundle ..." ) print( " [3] Creating the standard directory structure for 'klayout.app' bundle ..." )
#------------------------------------------------------------- #-----------------------------------------------------------------
# [3] Create the directory skeleton for "klayout.app" bundle # [3] Create the directory skeleton for "klayout.app" bundle
# and command line buddy tools such as "strm2cif". # and command line buddy tools such as "strm2cif".
# They are stored in the directory structure below. # They are stored in the directory structure below.
@ -497,8 +521,11 @@ def DeployBinariesForBundle():
# +-- Contents/+ # +-- Contents/+
# +-- Info.plist # +-- Info.plist
# +-- PkgInfo # +-- PkgInfo
# +-- Resources/ # +-- Resources/+
# +-- Frameworks/ # | +-- 'klayout.icns'
# +-- Frameworks/+
# | +-- '*.framework'
# | +-- '*.dylib'
# +-- MacOS/+ # +-- MacOS/+
# | +-- 'klayout' # | +-- 'klayout'
# +-- Buddy/+ # +-- Buddy/+
@ -506,7 +533,7 @@ def DeployBinariesForBundle():
# +-- 'strm2dxf' # +-- 'strm2dxf'
# : # :
# +-- 'strmxor' # +-- 'strmxor'
#------------------------------------------------------------- #-----------------------------------------------------------------
targetDir0 = "%s/klayout.app/Contents" % AbsMacPkgDir targetDir0 = "%s/klayout.app/Contents" % AbsMacPkgDir
targetDirR = targetDir0 + "/Resources" targetDirR = targetDir0 + "/Resources"
targetDirF = targetDir0 + "/Frameworks" targetDirF = targetDir0 + "/Frameworks"
@ -654,14 +681,15 @@ def DeployBinariesForBundle():
#------------------------------------------------------------- #-------------------------------------------------------------
# [8] Deploy Qt frameworks # [8] Deploy Qt frameworks
#------------------------------------------------------------- #-------------------------------------------------------------
verbose = " -verbose=%d" % DeployVerbose
if ModuleQt == 'Qt4MacPorts': if ModuleQt == 'Qt4MacPorts':
deploytool = Qt4MacPorts['deploy'] deploytool = Qt4MacPorts['deploy']
app_bundle = "klayout.app" app_bundle = "klayout.app"
options = macdepQtOpt options = macdepQtOpt + verbose
elif ModuleQt == 'Qt5MacPorts': elif ModuleQt == 'Qt5MacPorts':
deploytool = Qt5MacPorts['deploy'] deploytool = Qt5MacPorts['deploy']
app_bundle = "klayout.app" app_bundle = "klayout.app"
options = macdepQtOpt options = macdepQtOpt + verbose
os.chdir(ProjectDir) os.chdir(ProjectDir)
os.chdir(MacPkgDir) os.chdir(MacPkgDir)
@ -715,23 +743,25 @@ def DeployScriptBundles():
print( " [3] Creating the standard directory structure for the script bundles ..." ) print( " [3] Creating the standard directory structure for the script bundles ..." )
#------------------------------------------------------------- #--------------------------------------------------------------------------------------------
# [3] Create the directory skeleton for the two script bundles. # [3] Create the directory skeleton for the two script bundles.
# #
# klayout.scripts/+ # klayout.scripts/+
# +-- KLayoutEditor.app/+ # +-- KLayoutEditor.app/+
# | +-- Contents/+ # | +-- Contents/+
# | +-- Info.plist # | +-- Info.plist
# | +-- Resources/ # | +-- Resources/+
# | | +-- 'klayout-red.icns'
# | +-- MacOS/+ # | +-- MacOS/+
# | +-- 'KLayoutEditor.sh' # | +-- 'KLayoutEditor.sh'
# +-- KLayoutViewer.app/+ # +-- KLayoutViewer.app/+
# +-- Contents/+ # +-- Contents/+
# +-- Info.plist # +-- Info.plist
# +-- Resources/ # +-- Resources/+
# | +-- 'klayout-blue.icns'
# +-- MacOS/+ # +-- MacOS/+
# +-- 'KLayoutViewer.sh' # +-- 'KLayoutViewer.sh'
#------------------------------------------------------------- #--------------------------------------------------------------------------------------------
os.chdir(ProjectDir) os.chdir(ProjectDir)
targetDir0E = "%s/%s/KLayoutEditor.app/Contents" % ( AbsMacPkgDir, scriptDir ) targetDir0E = "%s/%s/KLayoutEditor.app/Contents" % ( AbsMacPkgDir, scriptDir )
targetDir0V = "%s/%s/KLayoutViewer.app/Contents" % ( AbsMacPkgDir, scriptDir ) targetDir0V = "%s/%s/KLayoutViewer.app/Contents" % ( AbsMacPkgDir, scriptDir )

View File

@ -27,6 +27,7 @@ Qts = [ 'Qt4MacPorts', 'Qt5MacPorts' ]
# Whereabout of different components of Qt4 # Whereabout of different components of Qt4
#----------------------------------------------------- #-----------------------------------------------------
# Qt4 from MacPorts (https://www.macports.org/) # Qt4 from MacPorts (https://www.macports.org/)
# [Key Type Name] = 'Qt4MacPorts'
Qt4MacPorts = { 'qmake' : '/opt/local/libexec/qt4/bin/qmake', Qt4MacPorts = { 'qmake' : '/opt/local/libexec/qt4/bin/qmake',
'deploy': '/opt/local/libexec/qt4/bin/macdeployqt' 'deploy': '/opt/local/libexec/qt4/bin/macdeployqt'
} }
@ -35,6 +36,7 @@ Qt4MacPorts = { 'qmake' : '/opt/local/libexec/qt4/bin/qmake',
# Whereabout of different components of Qt5 # Whereabout of different components of Qt5
#----------------------------------------------------- #-----------------------------------------------------
# Qt5 from MacPorts (https://www.macports.org/) # Qt5 from MacPorts (https://www.macports.org/)
# [Key Type Name] = 'Qt5MacPorts'
Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake', Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake',
'deploy': '/opt/local/libexec/qt5/bin/macdeployqt' 'deploy': '/opt/local/libexec/qt5/bin/macdeployqt'
} }
@ -43,30 +45,34 @@ Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake',
# [2] Ruby # [2] Ruby
#----------------------------------------------------- #-----------------------------------------------------
Rubies = [ 'nil', 'RubyYosemite', 'RubyElCapitan', 'RubySierra', 'RubyHighSierra' ] Rubies = [ 'nil', 'RubyYosemite', 'RubyElCapitan', 'RubySierra', 'RubyHighSierra' ]
Rubies += [ 'Ruby24SrcBuild' ] Rubies += [ 'Ruby24SrcBuild', 'Ruby24MacPorts' ]
#----------------------------------------------------- #-----------------------------------------------------
# Whereabout of different components of Ruby # Whereabout of different components of Ruby
#----------------------------------------------------- #-----------------------------------------------------
# Bundled with Yosemite (10.10) # Bundled with Yosemite (10.10)
# [Key Type Name] = 'Sys'
RubyYosemite = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby' , RubyYosemite = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby' ,
'inc': '/System/Library/Frameworks/Ruby.framework/Headers', 'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib' 'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib'
} }
# Bundled with El Capitan (10.11) # Bundled with El Capitan (10.11)
# [Key Type Name] = 'Sys'
RubyElCapitan = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby' , RubyElCapitan = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby' ,
'inc': '/System/Library/Frameworks/Ruby.framework/Headers', 'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib' 'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib'
} }
# Bundled with Sierra (10.12) # Bundled with Sierra (10.12)
# [Key Type Name] = 'Sys'
RubySierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby' , RubySierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby' ,
'inc': '/System/Library/Frameworks/Ruby.framework/Headers', 'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib' 'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib'
} }
# Bundled with High Sierra (10.13) # Bundled with High Sierra (10.13)
# [Key Type Name] = 'Sys'
RubyHighSierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby' , RubyHighSierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby' ,
'inc': '/System/Library/Frameworks/Ruby.framework/Headers', 'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib' 'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib'
@ -74,70 +80,96 @@ RubyHighSierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2
# Ruby 2.4 built from source code (https://github.com/ruby): *+*+*+ EXPERIMENTAL *+*+*+ # Ruby 2.4 built from source code (https://github.com/ruby): *+*+*+ EXPERIMENTAL *+*+*+
# configured by: # configured by:
# $ ./configure --prefix=$HOME/Ruby24/ --enable-shared # $ ./configure --prefix=$HOME/Ruby24/ --enable-shared --program-suffix=2.4
Ruby24SrcBuild = { 'exe': '$HOME/Ruby24/bin/ruby', # [Key Type Name] = 'Src24'
Ruby24SrcBuild = { 'exe': '$HOME/Ruby24/bin/ruby2.4',
'inc': '$HOME/Ruby24/include/ruby-2.4.0', 'inc': '$HOME/Ruby24/include/ruby-2.4.0',
'lib': '$HOME/Ruby24/lib/libruby.2.4.dylib' 'lib': '$HOME/Ruby24/lib/libruby.2.4.dylib'
} }
# Ruby 2.4 from MacPorts (https://www.macports.org/) *+*+*+ EXPERIMENTAL *+*+*+
# [Key Type Name] = 'MP24'
Ruby24MacPorts = { 'exe': '/opt/local/bin/ruby2.4',
'inc': '/opt/local/include/ruby-2.4.0',
'lib': '/opt/local/lib/libruby.2.4.dylib'
}
# Consolidated dictionary kit for Ruby # Consolidated dictionary kit for Ruby
RubyDictionary = { 'nil' : None, RubyDictionary = { 'nil' : None,
'RubyYosemite' : RubyYosemite, 'RubyYosemite' : RubyYosemite,
'RubyElCapitan' : RubyElCapitan, 'RubyElCapitan' : RubyElCapitan,
'RubySierra' : RubySierra, 'RubySierra' : RubySierra,
'RubyHighSierra': RubyHighSierra, 'RubyHighSierra': RubyHighSierra,
'Ruby24SrcBuild': Ruby24SrcBuild 'Ruby24SrcBuild': Ruby24SrcBuild,
'Ruby24MacPorts': Ruby24MacPorts
} }
#----------------------------------------------------- #-----------------------------------------------------
# [3] Python # [3] Python
#----------------------------------------------------- #-----------------------------------------------------
Pythons = [ 'nil', 'PythonYosemite', 'PythonElCapitan', 'PythonSierra', 'PythonHighSierra' ] Pythons = [ 'nil', 'PythonYosemite', 'PythonElCapitan', 'PythonSierra', 'PythonHighSierra' ]
Pythons += [ 'Anaconda27', 'Anaconda36' ] Pythons += [ 'Anaconda27', 'Anaconda36', 'Python36MacPorts' ]
#----------------------------------------------------- #-----------------------------------------------------
# Whereabout of different components of Python # Whereabout of different components of Python
#----------------------------------------------------- #-----------------------------------------------------
# Bundled with Yosemite (10.10) # Bundled with Yosemite (10.10)
# [Key Type Name] = 'Sys'
PythonYosemite = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' , PythonYosemite = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' ,
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7', 'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib' 'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
} }
# Bundled with El Capitan (10.11) # Bundled with El Capitan (10.11)
# [Key Type Name] = 'Sys'
PythonElCapitan = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' , PythonElCapitan = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' ,
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7', 'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib' 'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
} }
# Bundled with Sierra (10.12) # Bundled with Sierra (10.12)
# [Key Type Name] = 'Sys'
PythonSierra = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' , PythonSierra = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' ,
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7', 'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib' 'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
} }
# Bundled with High Sierra (10.13) # Bundled with High Sierra (10.13)
# [Key Type Name] = 'Sys'
PythonHighSierra= { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' , PythonHighSierra= { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' ,
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7', 'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib' 'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
} }
# Using anaconda (https://www.anaconda.com/download/#macos): *+*+*+ EXPERIMENTAL *+*+*+ # Using anaconda (https://www.anaconda.com/download/#macos): *+*+*+ EXPERIMENTAL *+*+*+
# prepared by: $ conda create -n py27klayout python=2.7 # If the path to your `conda` command is '$HOME/anaconda/bin/conda'
# and your Python environment was prepared by: $ conda create -n py27klayout python=2.7
#
# No additional modules are added in the beginning. # No additional modules are added in the beginning.
# [Key Type Name] = 'Ana27'
Anaconda27 = { 'exe': '$HOME/anaconda/envs/py27klayout/bin/python2.7' , Anaconda27 = { 'exe': '$HOME/anaconda/envs/py27klayout/bin/python2.7' ,
'inc': '$HOME/anaconda/envs/py27klayout/include', 'inc': '$HOME/anaconda/envs/py27klayout/include/python2.7',
'lib': '$HOME/anaconda/envs/py27klayout/lib/libpython2.7.dylib' 'lib': '$HOME/anaconda/envs/py27klayout/lib/libpython2.7.dylib'
} }
# Using anaconda (https://www.anaconda.com/download/#macos): *+*+*+ EXPERIMENTAL *+*+*+ # Using anaconda (https://www.anaconda.com/download/#macos): *+*+*+ EXPERIMENTAL *+*+*+
# prepared by: $ conda create -n py36klayout python=3.6 # If the path to your `conda` command is '$HOME/anaconda/bin/conda'
# and your Python environment was prepared by: $ conda create -n py36klayout python=3.6
#
# No additional modules are added in the beginning. # No additional modules are added in the beginning.
# [Key Type Name] = 'Ana36'
Anaconda36 = { 'exe': '$HOME/anaconda/envs/py36klayout/bin/python3.6' , Anaconda36 = { 'exe': '$HOME/anaconda/envs/py36klayout/bin/python3.6' ,
'inc': '$HOME/anaconda/envs/py36klayout/include', 'inc': '$HOME/anaconda/envs/py36klayout/include/python3.6m',
'lib': '$HOME/anaconda/envs/py36klayout/lib/libpython3.6m.dylib' 'lib': '$HOME/anaconda/envs/py36klayout/lib/libpython3.6m.dylib'
} }
# Python 3.6 from MacPorts (https://www.macports.org/) *+*+*+ EXPERIMENTAL *+*+*+
# [Key Type Name] = 'MP36'
Python36MacPorts= { 'exe': '/opt/local/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6m' ,
'inc': '/opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m',
'lib': '/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6m.dylib'
}
# Consolidated dictionary kit for Python # Consolidated dictionary kit for Python
PythonDictionary= { 'nil' : None, PythonDictionary= { 'nil' : None,
'PythonYosemite' : PythonYosemite, 'PythonYosemite' : PythonYosemite,
@ -145,7 +177,8 @@ PythonDictionary= { 'nil' : None,
'PythonSierra' : PythonSierra, 'PythonSierra' : PythonSierra,
'PythonHighSierra': PythonHighSierra, 'PythonHighSierra': PythonHighSierra,
'Anaconda27' : Anaconda27, 'Anaconda27' : Anaconda27,
'Anaconda36' : Anaconda36 'Anaconda36' : Anaconda36,
'Python36MacPorts': Python36MacPorts
} }
#----------------------------------------------------- #-----------------------------------------------------

View File

@ -121,8 +121,11 @@ def SetChangeIdentificationNameOfDyLib( libdic ):
# +-- Contents/+ # +-- Contents/+
# +-- Info.plist # +-- Info.plist
# +-- PkgInfo # +-- PkgInfo
# +-- Resources/ # +-- Resources/+
# +-- Frameworks/ # | +-- 'klayout.icns'
# +-- Frameworks/+
# | +-- '*.framework'
# | +-- '*.dylib'
# +-- MacOS/+ # +-- MacOS/+
# | +-- 'klayout' # | +-- 'klayout'
# +-- Buddy/+ # +-- Buddy/+

View File

@ -54,7 +54,7 @@ DB_PUBLIC unsigned int get_unique_user_object_class_id ();
* in order to be able to be put into a user_object<C>. * in order to be able to be put into a user_object<C>.
*/ */
template <class C> template <class C>
class user_object_base class DB_PUBLIC_TEMPLATE user_object_base
{ {
public: public:
typedef C coord_type; typedef C coord_type;
@ -399,7 +399,7 @@ typedef user_object<db::DCoord> DUserObject;
* @brief The base object of a factory-instantiable object * @brief The base object of a factory-instantiable object
*/ */
template <class C> template <class C>
class user_object_factory_base class DB_PUBLIC_TEMPLATE user_object_factory_base
{ {
public: public:
user_object_factory_base () { } user_object_factory_base () { }
@ -414,7 +414,7 @@ public:
* This implements a factory for objects of class X with coordinate base type C. * This implements a factory for objects of class X with coordinate base type C.
*/ */
template <class X, class C> template <class X, class C>
class user_object_factory_impl class DB_PUBLIC_TEMPLATE user_object_factory_impl
: public user_object_factory_base <C> : public user_object_factory_base <C>
{ {
public: public: