mirror of https://github.com/KLayout/klayout.git
To test "build4mac.py" family with non-standard script language support like Anaconda.
This refs #4.
This commit is contained in:
parent
0ead95ddf6
commit
91bf2a1eb0
|
|
@ -61,9 +61,10 @@ def SetGlobals():
|
|||
Usage += " : * key type names below are case insensitive * | \n"
|
||||
Usage += " : 'nil' = not to support the 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 += " [-r|--ruby <type>] : type=['nil', 'Sys', 'RubySource'] | sys \n"
|
||||
Usage += " [-p|--python <type>] : type=['nil', 'Sys', 'Anaconda27', 'Anaconda36'] | sys \n"
|
||||
Usage += " [-r|--ruby <type>] : type=['nil', 'Sys', 'Src24', 'MP24'] | 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 += " [-m|--make <option>] : option passed to 'make' | -j4 \n"
|
||||
Usage += " [-d|--debug] : enable debug mode build | disabled \n"
|
||||
|
|
@ -155,11 +156,11 @@ def ParseCommandLineArguments():
|
|||
|
||||
p.add_option( '-r', '--ruby',
|
||||
dest='type_ruby',
|
||||
help="Ruby type=['nil', 'Sys', 'RubySource']" )
|
||||
help="Ruby type=['nil', 'Sys', 'Src24', 'MP24']" )
|
||||
|
||||
p.add_option( '-p', '--python',
|
||||
dest='type_python',
|
||||
help="Python type=['nil', 'Sys', 'Anaconda27', 'Anaconda36']" )
|
||||
help="Python type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36']" )
|
||||
|
||||
p.add_option( '-n', '--noqtbinding',
|
||||
action='store_true',
|
||||
|
|
@ -231,7 +232,7 @@ def ParseCommandLineArguments():
|
|||
quit()
|
||||
|
||||
# Determine Ruby type
|
||||
candidates = [ i.upper() for i in ['nil', 'Sys', 'RubySource'] ]
|
||||
candidates = [ i.upper() for i in ['nil', 'Sys', 'Src24', 'MP24'] ]
|
||||
ModuleRuby = ""
|
||||
index = 0
|
||||
for item in candidates:
|
||||
|
|
@ -253,6 +254,8 @@ def ParseCommandLineArguments():
|
|||
break
|
||||
elif index == 2:
|
||||
ModuleRuby = 'Ruby24SrcBuild'
|
||||
elif index == 3:
|
||||
ModuleRuby = 'Ruby24MacPorts'
|
||||
else:
|
||||
index += 1
|
||||
if ModuleRuby == "":
|
||||
|
|
@ -262,9 +265,9 @@ def ParseCommandLineArguments():
|
|||
quit()
|
||||
|
||||
# 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 = ""
|
||||
index = 0
|
||||
index = 0
|
||||
for item in candidates:
|
||||
if opt.type_python.upper() == item:
|
||||
if index == 0:
|
||||
|
|
@ -286,6 +289,8 @@ def ParseCommandLineArguments():
|
|||
ModulePython = 'Anaconda27'
|
||||
elif index == 3:
|
||||
ModulePython = 'Anaconda36'
|
||||
elif index == 4:
|
||||
ModulePython = 'Python36MacPorts'
|
||||
else:
|
||||
index += 1
|
||||
if ModulePython == "":
|
||||
|
|
@ -488,7 +493,7 @@ def DeployBinariesForBundle():
|
|||
|
||||
|
||||
print( " [3] Creating the standard directory structure for 'klayout.app' bundle ..." )
|
||||
#-------------------------------------------------------------
|
||||
#-----------------------------------------------------------------
|
||||
# [3] Create the directory skeleton for "klayout.app" bundle
|
||||
# and command line buddy tools such as "strm2cif".
|
||||
# They are stored in the directory structure below.
|
||||
|
|
@ -497,8 +502,11 @@ def DeployBinariesForBundle():
|
|||
# +-- Contents/+
|
||||
# +-- Info.plist
|
||||
# +-- PkgInfo
|
||||
# +-- Resources/
|
||||
# +-- Frameworks/
|
||||
# +-- Resources/+
|
||||
# | +-- 'klayout.icns'
|
||||
# +-- Frameworks/+
|
||||
# | +-- '*.framework'
|
||||
# | +-- '*.dylib'
|
||||
# +-- MacOS/+
|
||||
# | +-- 'klayout'
|
||||
# +-- Buddy/+
|
||||
|
|
@ -506,7 +514,7 @@ def DeployBinariesForBundle():
|
|||
# +-- 'strm2dxf'
|
||||
# :
|
||||
# +-- 'strmxor'
|
||||
#-------------------------------------------------------------
|
||||
#-----------------------------------------------------------------
|
||||
targetDir0 = "%s/klayout.app/Contents" % AbsMacPkgDir
|
||||
targetDirR = targetDir0 + "/Resources"
|
||||
targetDirF = targetDir0 + "/Frameworks"
|
||||
|
|
@ -715,23 +723,25 @@ def DeployScriptBundles():
|
|||
|
||||
|
||||
print( " [3] Creating the standard directory structure for the script bundles ..." )
|
||||
#-------------------------------------------------------------
|
||||
#--------------------------------------------------------------------------------------------
|
||||
# [3] Create the directory skeleton for the two script bundles.
|
||||
#
|
||||
# klayout.scripts/+
|
||||
# +-- KLayoutEditor.app/+
|
||||
# | +-- Contents/+
|
||||
# | +-- Info.plist
|
||||
# | +-- Resources/
|
||||
# | +-- Resources/+
|
||||
# | | +-- 'klayout-red.icns'
|
||||
# | +-- MacOS/+
|
||||
# | +-- 'KLayoutEditor.sh'
|
||||
# +-- KLayoutViewer.app/+
|
||||
# +-- Contents/+
|
||||
# +-- Info.plist
|
||||
# +-- Resources/
|
||||
# +-- Resources/+
|
||||
# | +-- 'klayout-blue.icns'
|
||||
# +-- MacOS/+
|
||||
# +-- 'KLayoutViewer.sh'
|
||||
#-------------------------------------------------------------
|
||||
#--------------------------------------------------------------------------------------------
|
||||
os.chdir(ProjectDir)
|
||||
targetDir0E = "%s/%s/KLayoutEditor.app/Contents" % ( AbsMacPkgDir, scriptDir )
|
||||
targetDir0V = "%s/%s/KLayoutViewer.app/Contents" % ( AbsMacPkgDir, scriptDir )
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ Qts = [ 'Qt4MacPorts', 'Qt5MacPorts' ]
|
|||
# Whereabout of different components of Qt4
|
||||
#-----------------------------------------------------
|
||||
# Qt4 from MacPorts (https://www.macports.org/)
|
||||
# [Key Type Name] = 'Qt4MacPorts'
|
||||
Qt4MacPorts = { 'qmake' : '/opt/local/libexec/qt4/bin/qmake',
|
||||
'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
|
||||
#-----------------------------------------------------
|
||||
# Qt5 from MacPorts (https://www.macports.org/)
|
||||
# [Key Type Name] = 'Qt5MacPorts'
|
||||
Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake',
|
||||
'deploy': '/opt/local/libexec/qt5/bin/macdeployqt'
|
||||
}
|
||||
|
|
@ -43,30 +45,34 @@ Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake',
|
|||
# [2] Ruby
|
||||
#-----------------------------------------------------
|
||||
Rubies = [ 'nil', 'RubyYosemite', 'RubyElCapitan', 'RubySierra', 'RubyHighSierra' ]
|
||||
Rubies += [ 'Ruby24SrcBuild' ]
|
||||
Rubies += [ 'Ruby24SrcBuild', 'Ruby24MacPorts' ]
|
||||
|
||||
#-----------------------------------------------------
|
||||
# Whereabout of different components of Ruby
|
||||
#-----------------------------------------------------
|
||||
# Bundled with Yosemite (10.10)
|
||||
# [Key Type Name] = 'Sys'
|
||||
RubyYosemite = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby' ,
|
||||
'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
|
||||
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib'
|
||||
}
|
||||
|
||||
# Bundled with El Capitan (10.11)
|
||||
# [Key Type Name] = 'Sys'
|
||||
RubyElCapitan = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby' ,
|
||||
'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
|
||||
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib'
|
||||
}
|
||||
|
||||
# Bundled with Sierra (10.12)
|
||||
# [Key Type Name] = 'Sys'
|
||||
RubySierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby' ,
|
||||
'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
|
||||
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib'
|
||||
}
|
||||
|
||||
# Bundled with High Sierra (10.13)
|
||||
# [Key Type Name] = 'Sys'
|
||||
RubyHighSierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby' ,
|
||||
'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
|
||||
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib'
|
||||
|
|
@ -74,49 +80,62 @@ RubyHighSierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2
|
|||
|
||||
# Ruby 2.4 built from source code (https://github.com/ruby): *+*+*+ EXPERIMENTAL *+*+*+
|
||||
# configured by:
|
||||
# $ ./configure --prefix=$HOME/Ruby24/ --enable-shared
|
||||
Ruby24SrcBuild = { 'exe': '$HOME/Ruby24/bin/ruby',
|
||||
# $ ./configure --prefix=$HOME/Ruby24/ --enable-shared --program-suffix=2.4
|
||||
# [Key Type Name] = 'Src24'
|
||||
Ruby24SrcBuild = { 'exe': '$HOME/Ruby24/bin/ruby2.4',
|
||||
'inc': '$HOME/Ruby24/include/ruby-2.4.0',
|
||||
'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
|
||||
RubyDictionary = { 'nil' : None,
|
||||
'RubyYosemite' : RubyYosemite,
|
||||
'RubyElCapitan' : RubyElCapitan,
|
||||
'RubySierra' : RubySierra,
|
||||
'RubyHighSierra': RubyHighSierra,
|
||||
'Ruby24SrcBuild': Ruby24SrcBuild
|
||||
'Ruby24SrcBuild': Ruby24SrcBuild,
|
||||
'Ruby24MacPorts': Ruby24MacPorts
|
||||
}
|
||||
|
||||
#-----------------------------------------------------
|
||||
# [3] Python
|
||||
#-----------------------------------------------------
|
||||
Pythons = [ 'nil', 'PythonYosemite', 'PythonElCapitan', 'PythonSierra', 'PythonHighSierra' ]
|
||||
Pythons += [ 'Anaconda27', 'Anaconda36' ]
|
||||
Pythons += [ 'Anaconda27', 'Anaconda36', 'Python36MacPorts' ]
|
||||
|
||||
#-----------------------------------------------------
|
||||
# Whereabout of different components of Python
|
||||
#-----------------------------------------------------
|
||||
# Bundled with Yosemite (10.10)
|
||||
# [Key Type Name] = 'Sys'
|
||||
PythonYosemite = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' ,
|
||||
'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'
|
||||
}
|
||||
|
||||
# Bundled with El Capitan (10.11)
|
||||
# [Key Type Name] = 'Sys'
|
||||
PythonElCapitan = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' ,
|
||||
'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'
|
||||
}
|
||||
|
||||
# Bundled with Sierra (10.12)
|
||||
# [Key Type Name] = 'Sys'
|
||||
PythonSierra = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' ,
|
||||
'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'
|
||||
}
|
||||
|
||||
# Bundled with High Sierra (10.13)
|
||||
# [Key Type Name] = 'Sys'
|
||||
PythonHighSierra= { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' ,
|
||||
'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'
|
||||
|
|
@ -127,6 +146,7 @@ PythonHighSierra= { 'exe': '/System/Library/Frameworks/Python.framework/Versions
|
|||
# and your Python environment was prepared by: $ conda create -n py27klayout python=2.7
|
||||
#
|
||||
# No additional modules are added in the beginning.
|
||||
# [Key Type Name] = 'Ana27'
|
||||
Anaconda27 = { 'exe': '$HOME/anaconda/envs/py27klayout/bin/python2.7' ,
|
||||
'inc': '$HOME/anaconda/envs/py27klayout/include/python2.7',
|
||||
'lib': '$HOME/anaconda/envs/py27klayout/lib/libpython2.7.dylib'
|
||||
|
|
@ -137,11 +157,19 @@ Anaconda27 = { 'exe': '$HOME/anaconda/envs/py27klayout/bin/python2.7' ,
|
|||
# and your Python environment was prepared by: $ conda create -n py36klayout python=3.6
|
||||
#
|
||||
# No additional modules are added in the beginning.
|
||||
# [Key Type Name] = 'Ana36'
|
||||
Anaconda36 = { 'exe': '$HOME/anaconda/envs/py36klayout/bin/python3.6' ,
|
||||
'inc': '$HOME/anaconda/envs/py36klayout/include/python3.6m',
|
||||
'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
|
||||
PythonDictionary= { 'nil' : None,
|
||||
'PythonYosemite' : PythonYosemite,
|
||||
|
|
@ -149,7 +177,8 @@ PythonDictionary= { 'nil' : None,
|
|||
'PythonSierra' : PythonSierra,
|
||||
'PythonHighSierra': PythonHighSierra,
|
||||
'Anaconda27' : Anaconda27,
|
||||
'Anaconda36' : Anaconda36
|
||||
'Anaconda36' : Anaconda36,
|
||||
'Python36MacPorts': Python36MacPorts
|
||||
}
|
||||
|
||||
#-----------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -121,8 +121,11 @@ def SetChangeIdentificationNameOfDyLib( libdic ):
|
|||
# +-- Contents/+
|
||||
# +-- Info.plist
|
||||
# +-- PkgInfo
|
||||
# +-- Resources/
|
||||
# +-- Frameworks/
|
||||
# +-- Resources/+
|
||||
# | +-- 'klayout.icns'
|
||||
# +-- Frameworks/+
|
||||
# | +-- '*.framework'
|
||||
# | +-- '*.dylib'
|
||||
# +-- MacOS/+
|
||||
# | +-- 'klayout'
|
||||
# +-- Buddy/+
|
||||
|
|
|
|||
Loading…
Reference in New Issue