From 9720de0f372e9dd86ec910858c4b6b6d59ddc369 Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Sat, 24 Dec 2022 11:08:57 +0900 Subject: [PATCH] Again, the build system for macOS was revised to work with KLayout version 0.28 or later. --- macbuild/ReadMe.md | 107 +++++++++++++-------------------------- macbuild/build4mac.py | 25 +++++---- macbuild/makeDMG4mac.py | 106 ++++++++++++++++++++++++-------------- macbuild/nightlyBuild.py | 8 +-- 4 files changed, 121 insertions(+), 125 deletions(-) diff --git a/macbuild/ReadMe.md b/macbuild/ReadMe.md index 454440bb2..257a189d1 100644 --- a/macbuild/ReadMe.md +++ b/macbuild/ReadMe.md @@ -1,12 +1,13 @@ -Relevant KLayout version: 0.27.11
+Relevant KLayout version: 0.28.2
Author: Kazzz-S
-Last modified: 2022-10-10
+Last modified: 2022-12-24
# 1. Introduction -This directory **`macbuild`** contains different files required for building KLayout (http://www.klayout.de/) version 0.27.11 or later for different 64-bit macOS, including: +This directory **`macbuild`** contains different files required for building KLayout (http://www.klayout.de/) version 0.28.2 or later for different 64-bit macOS, including: * Catalina (10.15.7) : the primary development environment * Big Sur (11.x) : experimental; Apple M1 chip is not tested since the author does not own an M1 Mac * Monterey (12.x) : -- ditto -- +* Ventura (13.x) : planning Building KLayout for the previous operating systems listed below should still be possible.
However, they are not actively supported, and DMG packages are not provided. @@ -43,11 +44,9 @@ If you have installed Anaconda3 under $HOME/opt/anaconda3/, make a symbolic link ``` The migration work to "Qt6" is ongoing. You can try to use it; however, you will encounter some build and runtime errors. -For example, as of 2021-11-27, MacPorts' Qt6 does not provide `qt6-qtmultimedia`, which causes a build error. # 3. Script language support: Ruby and Python Earlier, by default, supported script languages, i.e., Ruby and Python, were those standard ones bundled with the OS.
-This configuration is possible only for macOS Catalina (10.15.7).
``` $ /usr/bin/ruby -v ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19] @@ -55,11 +54,10 @@ $ /usr/bin/ruby -v $ /usr/bin/python --version Python 2.7.16 ``` - -Big Sur (11.x) and Monterey (< 12.3) still provide Python 2.7 binaries to run various legacy applications.
-However, the latest Xcode 13.1 does not allow us to link the legacy Python 2.7 library with the newly compiled KLayout binaries.
-Moreover, Monterey (12.3.1) finally eliminated the Python 2.7 binaries.
-Therefore, Homebrew is adopted as the default environment for Big Sur and Monterey. +This configuration WAS possible only for macOS Catalina (10.15.7).
+However, it is no longer supported since KLayout version 0.28.x~ uses some Python3-specific features. +Therefore, MacPorts' Ruby 3.1 and Python 3.8 are adopted as the default environment for Catalina. +Big Sur and Monterey use Homebrew's Ruby 3.1 and Python 3.8 by default. The build script **`build4mac.py`** provides several possible combinations of Qt5, Ruy, and Python modules to accommodate such a slightly complex environment.
Some typical use cases are described in Section 6. @@ -71,12 +69,12 @@ You need to have the followings: * Optionally, Ruby and Python packages from MacPorts, Homebrew, or Anaconda3 #### For matching versions of Ruby and Python, please also refer to `build4mac_env.py`. -# 5. Command-line options of **`build4mac.py`** are as shown below. +# 5. Command-line options of **`build4mac.py`** are shown below. **((Notes))** For **Catalina** ``` --------------------------------------------------------------------------------------------------------- << Usage of 'build4mac.py' >> - for building KLayout 0.27.11 or later on different Apple macOS / Mac OSX platforms. + for building KLayout 0.28 or later on different Apple macOS / Mac OSX platforms. $ [python] ./build4mac.py option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value @@ -89,16 +87,15 @@ $ [python] ./build4mac.py : Qt6MacPorts: use Qt6 from MacPorts (*) | : Qt6Brew: use Qt6 from Homebrew (*) | : (*) migration to Qt6 is ongoing | - [-r|--ruby ] : case-insensitive type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3'] | sys + [-r|--ruby ] : case-insensitive type=['nil', 'Sys', 'MP31', 'HB31', 'Ana3'] | mp31 : nil: don't bind Ruby | : Sys: use OS-bundled Ruby [2.0 - 2.6] depending on OS | : MP31: use Ruby 3.1 from MacPorts | : HB31: use Ruby 3.1 from Homebrew | : Ana3: use Ruby 3.1 from Anaconda3 | - [-p|--python ] : case-insensitive type=['nil', 'Sys', 'MP38', 'HB38', 'Ana3', | sys + [-p|--python ] : case-insensitive type=['nil', 'MP38', 'HB38', 'Ana3', | mp38 : HB39', 'HBAuto'] | : nil: don't bind Python | - : Sys: use OS-bundled Python 2.7 [ElCapitan -- Catalina] | : MP38: use Python 3.8 from MacPorts | : HB38: use Python 3.8 from Homebrew | : Ana3: use Python 3.8 from Anaconda3 | @@ -110,7 +107,7 @@ $ [python] ./build4mac.py [-m|--make