Update the build tools for macOS:

* KLayout version 0.26.4
 * Homebrew Ruby 2.6 --> 2.7.
This commit is contained in:
Kazunari Sekigawa 2020-03-07 07:30:41 +09:00
parent c6760a8799
commit 20dd377108
3 changed files with 27 additions and 27 deletions

View File

@ -1,4 +1,4 @@
Relevant KLayout version: 0.26.1
Relevant KLayout version: 0.26.4
# 1. Introduction
This directory **`macbuild`** contains different files required for building KLayout (http://www.klayout.de/) version 0.26.1 or later for different 64-bit Mac OSXs including:
@ -61,11 +61,11 @@ $ [python] ./build4mac.py
: Qt5MacPorts: use Qt5 from MacPorts |
: Qt5Brew: use Qt5 from Homebrew |
: Qt5Ana3: use Qt5 from Anaconda3 |
[-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP26', 'HB26', 'Ana3'] | sys
[-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP26', 'HB27', 'Ana3'] | sys
: nil: don't bind Ruby |
: Sys: use OS-bundled Ruby [2.0 - 2.6] depending on OS |
: MP26: use Ruby 2.6 from MacPorts |
: HB26: use Ruby 2.6 from Homebrew |
: HB27: use Ruby 2.7 from Homebrew |
: Ana3: use Ruby 2.5 from Anaconda3 |
[-p|--python <type>] : case-insensitive type=['nil', 'Sys', 'MP37', 'HB37', 'Ana3'] | sys
: nil: don't bind Python |
@ -139,22 +139,22 @@ $ ./build4mac.py -q qt5macports -r mp26 -p mp37 -Y
* "Rmp26Pmp37" means that Ruby is 2.6 from MacPorts; Python is 3.7 from MacPorts.
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
### 6C. Fully Homebrew-flavored build with Homebrew Ruby 2.6 and Homebrew Python 3.7
### 6C. Fully Homebrew-flavored build with Homebrew Ruby 2.7 and Homebrew Python 3.7
```
$ cd /where/'build.sh'/exists
$ ./build4mac.py -q qt5brew -r hb26 -p hb37
$ ./build4mac.py -q qt5brew -r hb27 -p hb37
```
2. Confirm successful build (it will take about one hour depending on your machine spec).
3. Run **`build4mac.py`** again with the same options used in 1. PLUS "-Y" to deploy executables and libraries under **`klayout.app`** bundle.<br>
The buddy command-line tools (strm*) will also be deployed in this step.
```
$ ./build4mac.py -q qt5brew -r hb26 -p hb37 -Y
$ ./build4mac.py -q qt5brew -r hb27 -p hb37 -Y
```
The application bundle **`klayout.app`** is located under:<br>
**`LW-qt5Brew.pkg.macos-Catalina-release-Rhb26Phb37`** directory, where
**`LW-qt5Brew.pkg.macos-Catalina-release-Rhb27Phb37`** directory, where
* "LW-" means that this is a lightweight package.
* "qt5Brew" means that Qt5 from Homebrew is used.
* "Rhb26Phb37" means that Ruby is 2.6 from Homebrew; Python is 3.7 from Homebrew.
* "Rhb27Phb37" means that Ruby is 2.7 from Homebrew; Python is 3.7 from Homebrew.
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
### 6D. Partially Homebrew-flavored build with System Ruby and Homebrew Python 3.7
@ -220,8 +220,8 @@ $ cd /where/'build.sh'/exists
$ ./makeDMG4mac.py -p ST-qt5MP.pkg.macos-Catalina-release-RsysPsys -m
```
This command will generate the two files below:<br>
* **`ST-klayout-0.26.1-macOS-Catalina-1-qt5MP-RsysPsys.dmg`** ---(1) the main DMG file
* **`ST-klayout-0.26.1-macOS-Catalina-1-qt5MP-RsysPsys.dmg.md5`** ---(2) MD5-value text file
* **`ST-klayout-0.26.4-macOS-Catalina-1-qt5MP-RsysPsys.dmg`** ---(1) the main DMG file
* **`ST-klayout-0.26.4-macOS-Catalina-1-qt5MP-RsysPsys.dmg.md5`** ---(2) MD5-value text file
# Known issues
Because we assume some specific versions of non-OS-standard Ruby and Python, updating MacPorts, Homebrew, or Anaconda3 may cause build- and link errors.<br>

View File

@ -67,11 +67,11 @@ def SetGlobals():
Usage += " : Qt5MacPorts: use Qt5 from MacPorts | \n"
Usage += " : Qt5Brew: use Qt5 from Homebrew | \n"
Usage += " : Qt5Ana3: use Qt5 from Anaconda3 | \n"
Usage += " [-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP26', 'HB26', 'Ana3'] | sys \n"
Usage += " [-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP26', 'HB27', 'Ana3'] | sys \n"
Usage += " : nil: don't bind Ruby | \n"
Usage += " : Sys: use OS-bundled Ruby [2.0 - 2.6] depending on OS | \n"
Usage += " : MP26: use Ruby 2.6 from MacPorts | \n"
Usage += " : HB26: use Ruby 2.6 from Homebrew | \n"
Usage += " : HB27: use Ruby 2.7 from Homebrew | \n"
Usage += " : Ana3: use Ruby 2.5 from Anaconda3 | \n"
Usage += " [-p|--python <type>] : case-insensitive type=['nil', 'Sys', 'MP37', 'HB37', 'Ana3'] | sys \n"
Usage += " : nil: don't bind Python | \n"
@ -191,7 +191,7 @@ def ParseCommandLineArguments():
p.add_option( '-r', '--ruby',
dest='type_ruby',
help="Ruby type=['nil', 'Sys', 'MP26', 'HB26', 'Ana3']" )
help="Ruby type=['nil', 'Sys', 'MP26', 'HB27', 'Ana3']" )
p.add_option( '-p', '--python',
dest='type_python',
@ -289,7 +289,7 @@ def ParseCommandLineArguments():
candidates['NIL'] = 'nil'
candidates['SYS'] = 'Sys'
candidates['MP26'] = 'MP26'
candidates['HB26'] = 'HB26'
candidates['HB27'] = 'HB27'
candidates['ANA3'] = 'Ana3'
try:
choiceRuby = candidates[ opt.type_ruby.upper() ]
@ -315,8 +315,8 @@ def ParseCommandLineArguments():
elif choiceRuby == "MP26":
ModuleRuby = 'Ruby26MacPorts'
NonOSStdLang = True
elif choiceRuby == "HB26":
ModuleRuby = 'Ruby26Brew'
elif choiceRuby == "HB27":
ModuleRuby = 'Ruby27Brew'
NonOSStdLang = True
elif choiceRuby == "Ana3":
ModuleRuby = 'RubyAnaconda3'
@ -1008,11 +1008,11 @@ def DeployBinariesForBundle():
#-------------------------------------------------------------
# [10] Special deployment of Ruby2.6 from Homebrew?
#-------------------------------------------------------------
deploymentRuby26HB = (ModuleRuby == 'Ruby26Brew')
deploymentRuby26HB = (ModuleRuby == 'Ruby27Brew')
if deploymentRuby26HB and NonOSStdLang:
print( "" )
print( " [10] You have reached optional deployment of Ruby from %s ..." % HBRuby26Path )
print( " [10] You have reached optional deployment of Ruby from %s ..." % HBRuby27Path )
print( " [!!!] Sorry, the deployed package will not work properly since deployment of" )
print( " Ruby2.6 from Homebrew is not yet supported." )
print( " Since you have Homebrew development environment, there two options:" )

View File

@ -54,7 +54,7 @@ Qt5Ana3 = { 'qmake' : '%s/opt/anaconda3/bin/qmake' % MyHome,
#-----------------------------------------------------
RubyNil = [ 'nil' ]
RubySys = [ 'RubyElCapitan', 'RubySierra', 'RubyHighSierra', 'RubyMojave', 'RubyCatalina' ]
RubyExt = [ 'Ruby26MacPorts', 'Ruby26Brew', 'RubyAnaconda3' ]
RubyExt = [ 'Ruby26MacPorts', 'Ruby27Brew', 'RubyAnaconda3' ]
Rubies = RubyNil + RubySys + RubyExt
#-----------------------------------------------------
@ -117,13 +117,13 @@ Ruby26MacPorts = { 'exe': '/opt/local/bin/ruby2.6',
'lib': '/opt/local/lib/libruby.2.6.dylib'
}
# Ruby 2.6 from Homebrew *+*+*+ EXPERIMENTAL *+*+*+
# Ruby 2.7 from Homebrew *+*+*+ EXPERIMENTAL *+*+*+
# install with 'brew install ruby'
# [Key Type Name] = 'HB26'
HBRuby26Path = '/usr/local/Cellar/ruby/2.6.5'
Ruby26Brew = { 'exe': '%s/bin/ruby' % HBRuby26Path,
'inc': '%s/include/ruby-2.6.0' % HBRuby26Path,
'lib': '%s/lib/libruby.2.6.dylib' % HBRuby26Path
# [Key Type Name] = 'HB27'
HBRuby27Path = '/usr/local/Cellar/ruby/2.7.0'
Ruby27Brew = { 'exe': '%s/bin/ruby' % HBRuby27Path,
'inc': '%s/include/ruby-2.7.0' % HBRuby27Path,
'lib': '%s/lib/libruby.2.7.dylib' % HBRuby27Path
}
# Ruby 2.5 bundled with anaconda3 installed under $HOME/opt/anaconda3/ *+*+*+ EXPERIMENTAL *+*+*+
@ -143,7 +143,7 @@ RubyDictionary = { 'nil' : None,
'RubyMojave' : RubyMojave,
'RubyCatalina' : RubyCatalina,
'Ruby26MacPorts': Ruby26MacPorts,
'Ruby26Brew' : Ruby26Brew,
'Ruby27Brew' : Ruby27Brew,
'RubyAnaconda3' : RubyAnaconda3
}
@ -213,7 +213,7 @@ Python37MacPorts= { 'exe': '/opt/local/Library/Frameworks/Python.framework/Versi
# Python 3.7 from Homebrew *+*+*+ EXPERIMENTAL *+*+*+
# install with 'brew install python'
# [Key Type Name] = 'HB37'
HBPython37FrameworkPath = '/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework'
HBPython37FrameworkPath = '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework'
Python37Brew = { 'exe': '%s/Versions/3.7/bin/python3.7m' % HBPython37FrameworkPath,
'inc': '%s/Versions/3.7/include/python3.7m' % HBPython37FrameworkPath,
'lib': '%s/Versions/3.7/lib/libpython3.7m.dylib' % HBPython37FrameworkPath