adding brew options for python 3.6 and ruby 2.5

This commit is contained in:
Thomas Ferreira de Lima 2018-02-05 23:49:18 -05:00
parent fb69dfd866
commit ee0c348e14
5 changed files with 52 additions and 10 deletions

1
macbuild/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.pyc

View File

@ -62,7 +62,7 @@ $ ./build4mac.py -r mp24 -p mp36
```
$ ./build4mac.py -r mp24 -p mp36 -Y
```
* [-Y|--DEPOLY] option deploys KLayout's dylibs and executables only.
* [-Y|--DEPLOY] option deploys KLayout's dylibs and executables only.
That is, paths to other modules (Ruby, Python, and Qt5 Frameworks) remain unchanged (absolute paths in your development environment).
5. Copy/move generated bundles ("klayout.app" and "klayout.scripts/") to your "/Applications" directory for installation.

View File

@ -60,7 +60,7 @@ Relevant KLayout version: 0.25.1
to deploy executables and libraries under "klayout.app" bundle.
The buddy command line tools (strm*) will also be deployed.
$ ./build4mac.py -r mp24 -p mp36 -Y
* [-Y|--DEPOLY] option deploys KLayout's dylibs and executables only.
* [-Y|--DEPLOY] option deploys KLayout's dylibs and executables only.
That is, paths to other modules (Ruby, Python, and Qt5 Frameworks)
remain unchanged (absolute paths in your development environment).
(5) Copy/move generated bundles ("klayout.app" and "klayout.scripts/") to your

View File

@ -66,8 +66,8 @@ def SetGlobals():
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', 'Src24', 'MP24'] | sys \n"
Usage += " [-p|--python <type>] : type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36'] | sys \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 += " [-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"
@ -262,7 +262,7 @@ def ParseCommandLineArguments():
NonOSStdLang = False
# Determine Ruby type
candidates = [ i.upper() for i in ['nil', 'Sys', 'Src24', 'MP24'] ]
candidates = [ i.upper() for i in ['nil', 'Sys', 'Src24', 'MP24', 'B25'] ]
ModuleRuby = ""
index = 0
for item in candidates:
@ -288,6 +288,9 @@ def ParseCommandLineArguments():
elif index == 3:
ModuleRuby = 'Ruby24MacPorts'
NonOSStdLang = True
elif index == 4:
ModuleRuby = 'Ruby25Brew'
NonOSStdLang = True
else:
index += 1
if ModuleRuby == "":
@ -297,7 +300,7 @@ def ParseCommandLineArguments():
quit()
# Determine Python type
candidates = [ i.upper() for i in ['nil', 'Sys', 'Ana27', 'Ana36', 'MP36'] ]
candidates = [ i.upper() for i in ['nil', 'Sys', 'Ana27', 'Ana36', 'MP36', 'B36'] ]
ModulePython = ""
index = 0
for item in candidates:
@ -326,6 +329,9 @@ def ParseCommandLineArguments():
elif index == 4:
ModulePython = 'Python36MacPorts'
NonOSStdLang = True
elif index == 5:
ModulePython = 'Python36Brew'
NonOSStdLang = True
else:
index += 1
if ModulePython == "":
@ -427,6 +433,19 @@ def RunMainBuildBash():
AbsMacBuildLog = "%s/qt5.build.macos-%s-%s.log" % (ProjectDir, Platform, mode)
parameters += " \\\n -bin %s" % MacBinDir
parameters += " \\\n -build %s" % MacBuildDir
elif ModuleQt == 'Qt5Brew':
parameters += " \\\n -qt5"
parameters += " \\\n -qmake %s" % Qt5Brew['qmake']
MacPkgDir = "./qt5.pkg.macos-%s-%s" % (Platform, mode)
MacBinDir = "./qt5.bin.macos-%s-%s" % (Platform, mode)
MacBuildDir = "./qt5.build.macos-%s-%s" % (Platform, mode)
MacBuildLog = "./qt5.build.macos-%s-%s.log" % (Platform, mode)
AbsMacPkgDir = "%s/qt5.pkg.macos-%s-%s" % (ProjectDir, Platform, mode)
AbsMacBinDir = "%s/qt5.bin.macos-%s-%s" % (ProjectDir, Platform, mode)
AbsMacBuildDir = "%s/qt5.build.macos-%s-%s" % (ProjectDir, Platform, mode)
AbsMacBuildLog = "%s/qt5.build.macos-%s-%s.log" % (ProjectDir, Platform, mode)
parameters += " \\\n -bin %s" % MacBinDir
parameters += " \\\n -build %s" % MacBuildDir
# (C) want Qt bindings with Ruby scripts?
if NoQtBindings:

View File

@ -41,11 +41,17 @@ Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake',
'deploy': '/opt/local/libexec/qt5/bin/macdeployqt'
}
# # Qt5 from Brew
# # [Key Type Name] = 'Qt5Brew'
# Qt5Brew = { 'qmake' : '/usr/local/Cellar/qt5/5.10.0_1/bin/qmake',
# 'deploy': '/usr/local/Cellar/qt5/5.10.0_1/bin/macdeployqt'
# }
#-----------------------------------------------------
# [2] Ruby
#-----------------------------------------------------
Rubies = [ 'nil', 'RubyYosemite', 'RubyElCapitan', 'RubySierra', 'RubyHighSierra' ]
Rubies += [ 'Ruby24SrcBuild', 'Ruby24MacPorts' ]
Rubies += [ 'Ruby24SrcBuild', 'Ruby24MacPorts', 'Ruby24Brew' ]
#-----------------------------------------------------
# Whereabout of different components of Ruby
@ -94,6 +100,13 @@ Ruby24MacPorts = { 'exe': '/opt/local/bin/ruby2.4',
'lib': '/opt/local/lib/libruby.2.4.dylib'
}
# Ruby 2.5 from Brew *+*+*+ EXPERIMENTAL *+*+*+
# [Key Type Name] = 'Brew25'
Ruby25Brew = { 'exe': '/usr/local/bin/ruby',
'inc': '/usr/local/include/ruby-2.5.0',
'lib': '/usr/local/lib/libruby.2.5.0.dylib'
}
# Consolidated dictionary kit for Ruby
RubyDictionary = { 'nil' : None,
'RubyYosemite' : RubyYosemite,
@ -101,14 +114,15 @@ RubyDictionary = { 'nil' : None,
'RubySierra' : RubySierra,
'RubyHighSierra': RubyHighSierra,
'Ruby24SrcBuild': Ruby24SrcBuild,
'Ruby24MacPorts': Ruby24MacPorts
'Ruby24MacPorts': Ruby24MacPorts,
'Ruby25Brew' : Ruby25Brew
}
#-----------------------------------------------------
# [3] Python
#-----------------------------------------------------
Pythons = [ 'nil', 'PythonYosemite', 'PythonElCapitan', 'PythonSierra', 'PythonHighSierra' ]
Pythons += [ 'Anaconda27', 'Anaconda36', 'Python36MacPorts' ]
Pythons += [ 'Anaconda27', 'Anaconda36', 'Python36MacPorts', 'Python36Brew' ]
#-----------------------------------------------------
# Whereabout of different components of Python
@ -170,6 +184,13 @@ 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 *+*+*+
# [Key Type Name] = 'pybrew'
Python36Brew= { 'exe': '/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/bin/python3.6m' ,
'inc': '/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/include/python3.6m',
'lib': '/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6m.dylib'
}
# Consolidated dictionary kit for Python
PythonDictionary= { 'nil' : None,
'PythonYosemite' : PythonYosemite,
@ -178,7 +199,8 @@ PythonDictionary= { 'nil' : None,
'PythonHighSierra': PythonHighSierra,
'Anaconda27' : Anaconda27,
'Anaconda36' : Anaconda36,
'Python36MacPorts': Python36MacPorts
'Python36MacPorts': Python36MacPorts,
'Python36Brew' : Python36Brew,
}
#-----------------------------------------------------