Updated the macOS build system to work with Sequoia plus migration to Python 3.12

This commit is contained in:
Kazunari Sekigawa 2024-09-24 06:36:16 +09:00
parent 2d4f5d822c
commit 674a6738b8
18 changed files with 359 additions and 336 deletions

View File

@ -1,15 +1,16 @@
Relevant KLayout version: 0.29.4<br> Relevant KLayout version: 0.29.7<br>
Author: Kazzz-S<br> Author: Kazzz-S<br>
Last modified: 2024-07-10<br> Last modified: 2024-09-23<br>
# 1. Introduction # 1. Introduction
This directory **`macbuild`** contains various files required for building KLayout (http://www.klayout.de/) version 0.29.0 or later for different 64-bit macOS, including: This directory **`macbuild`** contains various files required for building KLayout (http://www.klayout.de/) version 0.29.7 or later for different 64-bit macOS, including:
* Monterey (12.x) : the primary development environment * Sonoma (14.x) : the primary development environment
* Ventura (13.x) : experimental * Ventura (13.x) : experimental
* Sonoma (14.x) : -- ditto -- * Sequoia (15.x) : -- ditto --
Building KLayout for the previous operating systems listed below has been discontinued.<br> Building KLayout for the previous operating systems listed below has been discontinued.<br>
Pre-built DMG packages are also not provided. Pre-built DMG packages are also not provided.<br>
* Monterey (12.7.6; the build is still possible, but Homebrew stopped supporting this OS in September 2024)
* Big Sur (11.7.10) * Big Sur (11.7.10)
* Catalina (10.15.7) * Catalina (10.15.7)
* Mojave (10.14) * Mojave (10.14)
@ -17,8 +18,9 @@ Pre-built DMG packages are also not provided.
* Sierra (10.12) * Sierra (10.12)
* El Capitan (10.11) * El Capitan (10.11)
Throughout this document, the primary target machine is **Intel x86_64** with **macOS Monterey**.<br> Throughout this document, the primary target machine is **Intel x86_64** with **macOS Sonoma**.<br>
All Apple (M1|M2|M3) chips are still untested, as the author does not own an (M1|M2|M3) Mac.<br> All Apple (M1|M2|M3) chips are still untested, as the author does not own an (M1|M2|M3) Mac.<br>
However, some kind volunteers told me they successfully built on an Apple silicon machine.<br>
# 2. Qt Frameworks # 2. Qt Frameworks
@ -41,8 +43,9 @@ If you have installed Anaconda3 under $HOME/opt/anaconda3/, make a symbolic link
/Applications/anaconda3/ ---> $HOME/opt/anaconda3/ /Applications/anaconda3/ ---> $HOME/opt/anaconda3/
``` ```
The migration work to "Qt6" is ongoing. You can try to use it; however, you will encounter some build and runtime errors.<br> The migration work to "Qt6" is ongoing. You can try to use it; however, you might encounter some build and runtime errors.<br>
If you use **Homebrew** to build KLayout >= 0.29.0, you need "Qt6" to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599). If you use **Homebrew** to build KLayout >= 0.29.0, you need "Qt6" to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).<br>
I have also tried migrating to "Python 3.12.x" (earlier, Python 3.11.x) in this version.
# 3. Script language support: Ruby and Python # 3. Script language support: Ruby and Python
@ -65,62 +68,62 @@ You need to have the followings:
The operating system type is detected automatically. The operating system type is detected automatically.
``` ```
--------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------
<< Usage of 'build4mac.py' >> << Usage of 'build4mac.py' >>
for building KLayout 0.29.0 or later on different Apple macOS platforms. for building KLayout 0.29.7 or later on different Apple macOS platforms.
$ [python] ./build4mac.py $ [python] ./build4mac.py
option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details) | default value
--------------------------------------------------------------------------------------+--------------- ----------------------------------------------------------------------------------------+---------------
[-q|--qt <type>] : case-insensitive type=['Qt5MacPorts', 'Qt5Brew', 'Qt5Ana3', | qt5macports [-q|--qt <type>] : case-insensitive type=['Qt5MacPorts', 'Qt5Brew', 'Qt5Ana3', | qt5macports
: 'Qt6MacPorts', 'Qt6Brew'] | : 'Qt6MacPorts', 'Qt6Brew'] |
: Qt5MacPorts: use Qt5 from MacPorts | : Qt5MacPorts: use Qt5 from MacPorts |
: Qt5Brew: use Qt5 from Homebrew | : Qt5Brew: use Qt5 from Homebrew |
: Qt5Ana3: use Qt5 from Anaconda3 | : Qt5Ana3: use Qt5 from Anaconda3 |
: Qt6MacPorts: use Qt6 from MacPorts (*) | : Qt6MacPorts: use Qt6 from MacPorts (*) |
: Qt6Brew: use Qt6 from Homebrew (*) | : Qt6Brew: use Qt6 from Homebrew (*) |
: (*) migration to Qt6 is ongoing | : (*) migration to Qt6 is ongoing |
[-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP33', 'HB33', 'Ana3'] | sys [-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP33', 'HB33', 'Ana3'] | sys
: nil: don't bind Ruby | : nil: don't bind Ruby |
: Sys: use [Sonoma|Ventura|Monterey]-bundled Ruby 2.6 | : Sys: use [Sequoia|Sonoma|Ventura|Monterey]-bundled Ruby 2.6 |
: MP33: use Ruby 3.3 from MacPorts | : MP33: use Ruby 3.3 from MacPorts |
: HB33: use Ruby 3.3 from Homebrew | : HB33: use Ruby 3.3 from Homebrew |
: Ana3: use Ruby 3.2 from Anaconda3 | : Ana3: use Ruby 3.2 from Anaconda3 |
[-p|--python <type>] : case-insensitive type=['nil', 'Sys', 'MP311', 'HB311', 'Ana3', | sys [-p|--python <type>] : case-insensitive type=['nil', 'Sys', 'MP312', 'HB312', 'Ana3', | sys
: 'MP39', 'HB39', 'HBAuto'] | : 'MP311', 'HB311', 'HBAuto'] |
: nil: don't bind Python | : nil: don't bind Python |
: Sys: use [Sonoma|Ventura|Monterey]-bundled Python 3.9 | : Sys: use [Sequoia|Sonoma|Ventura|Monterey]-bundled Python 3.9 |
: MP311: use Python 3.11 from MacPorts | : MP312: use Python 3.12 from MacPorts |
: HB311: use Python 3.11 from Homebrew | : HB312: use Python 3.12 from Homebrew |
: Ana3: use Python 3.11 from Anaconda3 | : Ana3: use Python 3.12 from Anaconda3 |
: MP39: use Python 3.9 from MacPorts (+) | : MP311: use Python 3.11 from MacPorts |
: HB39: use Python 3.9 from Homebrew (+) | : HB311: use Python 3.11 from Homebrew (+) |
: (+) for the backward compatibility tests | : (+) required to provide the legacy pip in HW-*.dmg |
: HBAuto: use the latest Python 3.x auto-detected from Homebrew | : HBAuto: use the latest Python 3.x auto-detected from Homebrew |
[-P|--buildPymod] : build and deploy Pymod (*.whl) for LW-*.dmg | disabled [-P|--buildPymod] : build and deploy Pymod (*.whl) for LW-*.dmg | disabled
[-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled
[-u|--noqtuitools] : don't include uitools in Qt binding | disabled [-u|--noqtuitools] : don't include uitools in Qt binding | disabled
[-g|--nolibgit2] : don't include libgit2 for Git package support | disabled [-g|--nolibgit2] : don't include libgit2 for Git package support | disabled
[-m|--make <option>] : option passed to 'make' | '--jobs=4' [-m|--make <option>] : option passed to 'make' | '--jobs=4'
[-d|--debug] : enable debug mode build; AddressSanitizer (ASAN) is linked | disabled [-d|--debug] : enable debug mode build; AddressSanitizer (ASAN) is linked | disabled
[-c|--checkcom] : check command-line and exit without building | disabled [-c|--checkcom] : check command-line and exit without building | disabled
[-y|--deploy] : deploy executables and dylibs, including Qt's Frameworks | disabled [-y|--deploy] : deploy executables and dylibs, including Qt's Frameworks | disabled
[-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled [-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled
: from the source code and use the tools in the same machine | : from the source code and use the tools in the same machine |
: ! After confirmation of the successful build of 'klayout.app', | : ! After confirmation of the successful build of 'klayout.app', |
: rerun this script with BOTH: | : rerun this script with BOTH: |
: 1) the same options used for building AND | : 1) the same options used for building AND |
: 2) <-y|--deploy> OR <-Y|--DEPLOY> | : 2) <-y|--deploy> OR <-Y|--DEPLOY> |
: optionally with [-v|--verbose <0-3>] | : optionally with [-v|--verbose <0-3>] |
[-v|--verbose <0-3>] : verbose level of `macdeployqt' (effective with -y only) | 1 [-v|--verbose <0-3>] : verbose level of `macdeployqt' (effective with -y only) | 1
: 0 = no output, 1 = error/warning (default), | : 0 = no output, 1 = error/warning (default), |
: 2 = normal, 3 = debug | : 2 = normal, 3 = debug |
[-?|--?] : print this usage and exit; in zsh, quote like '-?' or '--?' | disabled [-?|--?] : print this usage and exit; in zsh, quote like '-?' or '--?' | disabled
-----------------------------------------------------------------------------------------+--------------- -------------------------------------------------------------------------------------------+---------------
``` ```
# 6. Use-cases # 6. Use-cases
In this section, the actual file and directory names are those obtained on macOS Monterey.<br> In this section, the actual file and directory names are those obtained on macOS Sonoma.<br>
On different OS, those names differ accordingly. On different OS, those names differ accordingly.
### 6A. Standard build using the OS-bundled Ruby and Python with MacPorts Qt5 ### 6A. Standard build using the OS-bundled Ruby and Python with MacPorts Qt5
@ -138,7 +141,7 @@ Confirm that you have:
``` ```
As of this writing, the provided Python version is `3.9.6`. As of this writing, the provided Python version is `3.9.6`.
1. Invoke **`build4mac.py`** with the following options: **((Notes))** These options are the default values for Monterey, Ventura, and Sonoma. 1. Invoke **`build4mac.py`** with the following options: **((Notes))** These options are the default values for Sonoma, Ventura, and Sequioa.
``` ```
$ cd /where/'build.sh'/exists $ cd /where/'build.sh'/exists
$ ./build4mac.py -q qt5macports -r sys -p sys $ ./build4mac.py -q qt5macports -r sys -p sys
@ -151,27 +154,27 @@ $ ./build4mac.py -q qt5macports -r sys -p sys
$ ./build4mac.py -q qt5macports -r sys -p sys -y $ ./build4mac.py -q qt5macports -r sys -p sys -y
``` ```
The application bundle **`klayout.app`** is located under:<br> The application bundle **`klayout.app`** is located under:<br>
**`ST-qt5MP.pkg.macos-Monterey-release-RsysPsys`** directory, where **`ST-qt5MP.pkg.macos-Sonoma-release-RsysPsys`** directory, where
* "ST-" means this is a standard package. * "ST-" means this is a standard package.
* "qt5MP" means that Qt5 from MacPorts is used. * "qt5MP" means that Qt5 from MacPorts is used.
* "RsysPsys" means that Ruby is 2.6 provided by OS; Python is 3.9 provided by OS. * "RsysPsys" means that Ruby is 2.6 provided by OS; Python is 3.9 provided by OS.
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation. 4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
### 6B. Fully MacPorts-flavored build with MacPorts Ruby 3.3 and MacPorts Python 3.11 ### 6B. Fully MacPorts-flavored build with MacPorts Ruby 3.3 and MacPorts Python 3.12
0. Install MacPorts, then install Qt5, Ruby 3.3, Python 3.11, and libgit2 by 0. Install MacPorts, then install Qt5, Ruby 3.3, Python 3.12, and libgit2 by
``` ```
$ sudo port install coreutils $ sudo port install coreutils
$ sudo port install findutils $ sudo port install findutils
$ sudo port install qt5 $ sudo port install qt5
$ sudo port install ruby33 $ sudo port install ruby33
$ sudo port install python311 $ sudo port install python312
$ sudo port install py311-pip $ sudo port install py312-pip
$ sudo port install libgit2 $ sudo port install libgit2
``` ```
1. Invoke **`build4mac.py`** with the following options: 1. Invoke **`build4mac.py`** with the following options:
``` ```
$ cd /where/'build.sh'/exists $ cd /where/'build.sh'/exists
$ ./build4mac.py -q qt5macports -r mp33 -p mp311 $ ./build4mac.py -q qt5macports -r mp33 -p mp312
``` ```
2. Confirm successful build (it will take about one hour, depending on your machine spec). 2. Confirm successful build (it will take about one hour, depending on your machine spec).
3. Rerun **`build4mac.py`** with the same options used in 1. PLUS "-Y" to deploy executables and libraries under **`klayout.app`** bundle.<br> 3. Rerun **`build4mac.py`** with the same options used in 1. PLUS "-Y" to deploy executables and libraries under **`klayout.app`** bundle.<br>
@ -179,49 +182,56 @@ $ ./build4mac.py -q qt5macports -r mp33 -p mp311
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Standalone Python Package (\*.whl) will be built and deployed under **klayout.app/Contents/pymod-dist/**. If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Standalone Python Package (\*.whl) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
``` ```
$ ./build4mac.py -q qt5macports -r mp33 -p mp311 -Y $ ./build4mac.py -q qt5macports -r mp33 -p mp312 -Y
``` ```
The application bundle **`klayout.app`** is located under:<br> The application bundle **`klayout.app`** is located under:<br>
**`LW-qt5MP.pkg.macos-Monterey-release-Rmp33Pmp311`** directory, where **`LW-qt5MP.pkg.macos-Sonoma-release-Rmp33Pmp312`** directory, where
* "LW-" means this is a lightweight package. * "LW-" means this is a lightweight package.
* "qt5MP" means that Qt5 from MacPorts is used. * "qt5MP" means that Qt5 from MacPorts is used.
* "Rmp33Pmp311" means that Ruby is 3.3 from MacPorts; Python is 3.11 from MacPorts. * "Rmp33Pmp312" means that Ruby is 3.3 from MacPorts; Python is 3.12 from MacPorts.
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation. 4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
### 6C. Fully Homebrew-flavored build with Homebrew Ruby 3.3 and Homebrew Python 3.11 ### 6C. Fully Homebrew-flavored build with Homebrew Ruby 3.3 and Homebrew Python 3.12
> [!IMPORTANT] > [!IMPORTANT]
> To build KLayout >= 0.29.0, you need "Qt6" >= 6.7.0 to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).<br> > To build KLayout >= 0.29.0, you need "Qt6" >= 6.7.0 to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).<br>
0. Install Homebrew, then install Qt6, Ruby 3.3, Python 3.11, and libgit2 by 0. Install Homebrew, then install Qt6, Ruby 3.3, Python 3.12, and libgit2 by
``` ```
$ brew install qt@6 $ brew install qt@6
$ brew install ruby@3.3 $ brew install ruby@3.3
$ brew install python@3.11 $ brew install python@3.12
$ brew install libgit2 $ brew install libgit2
$ cd /where/'build.sh'/exists $ cd /where/'build.sh'/exists
$ cd macbuild $ cd macbuild
$ ./python3HB.py -v 3.11 $ ./python3HB.py -v 3.12
``` ```
1. Invoke **`build4mac.py`** with the following options: 1. Invoke **`build4mac.py`** with the following options:
``` ```
$ cd /where/'build.sh'/exists $ cd /where/'build.sh'/exists
$ ./build4mac.py -q qt6brew -r hb33 -p hb311 $ ./build4mac.py -q qt6brew -r hb33 -p hb312
``` ```
2. Confirm successful build (it will take about one hour, depending on your machine spec). 2. Confirm successful build (it will take about one hour, depending on your machine spec).
3. Rerun **`build4mac.py`** with the same options used in 1. PLUS "-Y" to deploy executables and libraries under **`klayout.app`** bundle.<br> 3. Rerun **`build4mac.py`** 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 under **klayout.app/Contents/Buddy/** in this step.<br> The buddy command-line tools (strm*) will also be deployed under **klayout.app/Contents/Buddy/** in this step.<br>
If you use `--buildPymod` option in Step-1 and Step-3, the KLayout Standalone Python Package (\*.whl) will be built and deployed under **klayout.app/Contents/pymod-dist/**.
``` ```
$ ./build4mac.py -q qt6brew -r hb33 -p hb311 -Y $ ./build4mac.py -q qt6brew -r hb33 -p hb312 -Y
``` ```
The application bundle **`klayout.app`** is located under:<br> The application bundle **`klayout.app`** is located under:<br>
**`LW-qt6Brew.pkg.macos-Monterey-release-Rhb33Phb311`** directory, where **`LW-qt6Brew.pkg.macos-Sonoma-release-Rhb33Phb312`** directory, where
* "LW-" means this is a lightweight package. * "LW-" means this is a lightweight package.
* "qt6Brew" means that Qt6 from Homebrew is used. * "qt6Brew" means that Qt6 from Homebrew is used.
* "Rhb33Phb311" means that Ruby is 3.3 from Homebrew; Python is 3.11 from Homebrew. * "Rhb33Phb312" means that Ruby is 3.3 from Homebrew; Python is 3.12 from Homebrew.
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation. 4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
> [!WARNING]
> We can no longer use the legacy **pip** command with Homebew Python@3.12, and we will get,
> ```
> error: externally-managed-environment
> ```
> To avoid this error, use a virtual environment, as Homebrew suggests.<br>
> See `HomebrewUser-ReadMeFirst.txt` in `Resources/script-bundle-B.zip` for details.
### 6D. Partially Homebrew-flavored build with System Ruby and Homebrew Python 3.11 ### 6D. Partially Homebrew-flavored build with System Ruby and Homebrew Python 3.11
> [!IMPORTANT] > [!IMPORTANT]
> To build KLayout >= 0.29.0, you need "Qt6" >= 6.7.0 to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).<br> > To build KLayout >= 0.29.0, you need "Qt6" >= 6.7.0 to address [the compilation issue](https://github.com/KLayout/klayout/issues/1599).<br>
@ -248,7 +258,7 @@ $ ./build4mac.py -q qt6brew -r sys -p hb311
$ ./build4mac.py -q qt6brew -r sys -p hb311 -y $ ./build4mac.py -q qt6brew -r sys -p hb311 -y
``` ```
The application bundle **`klayout.app`** is located under:<br> The application bundle **`klayout.app`** is located under:<br>
**`HW-qt6Brew.pkg.macos-Monterey-release-RsysPhb311`** directory, where **`HW-qt6Brew.pkg.macos-Sonoma-release-RsysPhb311`** directory, where
* "HW-" means this is a heavyweight package because both Qt6 and Python Frameworks are deployed. * "HW-" means this is a heavyweight package because both Qt6 and Python Frameworks are deployed.
* "qt6Brew" means that Qt6 from Homebrew is used. * "qt6Brew" means that Qt6 from Homebrew is used.
* "RsysPhb311" means that Ruby is OS-bundled; Python is 3.11 from Homebrew. * "RsysPhb311" means that Ruby is OS-bundled; Python is 3.11 from Homebrew.
@ -290,17 +300,17 @@ $ ./build4mac.py -q qt5macports -r sys -p hb311
$ ./build4mac.py -q qt5macports -r sys -p hb311 -y $ ./build4mac.py -q qt5macports -r sys -p hb311 -y
``` ```
The application bundle **`klayout.app`** is located under:<br> The application bundle **`klayout.app`** is located under:<br>
**`HW-qt5MP.pkg.macos-Monterey-release-RsysPhb311`** directory, where **`HW-qt5MP.pkg.macos-Sonoma-release-RsysPhb311`** directory, where
* "HW-" means this is a heavyweight package because both Qt5 and Python Frameworks are deployed. * "HW-" means this is a heavyweight package because both Qt5 and Python Frameworks are deployed.
* "qt5MP" means that Qt5 from MacPorts is used. * "qt5MP" means that Qt5 from MacPorts is used.
* "RsysPhb311" means that Ruby is OS-bundled; Python is 3.11 from Homebrew. * "RsysPhb311" means that Ruby is OS-bundled; Python is 3.11 from Homebrew.
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation. 4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
### 6F. Fully Anaconda3-flavored build with Anaconda3 Ruby 3.2 and Anaconda3 Python 3.11 ### 6F. Fully Anaconda3-flavored build with Anaconda3 Ruby 3.2 and Anaconda3 Python 3.12
0. Install Anaconda3 (Anaconda3-2023.09-0-MacOSX-x86_64.pkg), then install Ruby 3.2 and libgit2 by 0. Install Anaconda3 (Anaconda3-2024.06-1-MacOSX-x86_64.pkg), then install Ruby 3.2 and libgit2 by
``` ```
$ conda install ruby=3.2.2 $ conda install ruby=3.2.2
$ conda install -c conda-forge libgit2 $ conda install libgit2=1.6.4
``` ```
1. Invoke **`build4mac.py`** with the following options: 1. Invoke **`build4mac.py`** with the following options:
@ -317,10 +327,10 @@ $ ./build4mac.py -q qt5ana3 -r ana3 -p ana3
$ ./build4mac.py -q qt5ana3 -r ana3 -p ana3 -Y $ ./build4mac.py -q qt5ana3 -r ana3 -p ana3 -Y
``` ```
The application bundle **`klayout.app`** is located under:<br> The application bundle **`klayout.app`** is located under:<br>
**`LW-qt5Ana3.pkg.macos-Monterey-release-Rana3Pana3`** directory, where **`LW-qt5Ana3.pkg.macos-Sonoma-release-Rana3Pana3`** directory, where
* "LW-" means this is a lightweight package. * "LW-" means this is a lightweight package.
* "qt5Ana3" means that Qt5 from Anaconda3 is used. * "qt5Ana3" means that Qt5 from Anaconda3 is used.
* "Rana3Pana3" means that Ruby (3.2) is from Anaconda3; Python (3.11) is from Anaconda3. * "Rana3Pana3" means that Ruby (3.2) is from Anaconda3; Python (3.12) is from Anaconda3.
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation. 4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.
5. You may have to set the `PYTHONHOME` environment variable like: 5. You may have to set the `PYTHONHOME` environment variable like:
``` ```
@ -328,7 +338,7 @@ export PYTHONHOME=$HOME/opt/anaconda3
``` ```
### 6G. Other combinations ### 6G. Other combinations
Logically, several module combinations other than 6B through 6E are possible, including `nil` choice.<br> Logically, several module combinations other than 6A through 6F are possible, including `nil` choice.<br>
The resultant package directory name will begin with **`EX-`** (exceptional) if you choose such a combination. The resultant package directory name will begin with **`EX-`** (exceptional) if you choose such a combination.
### 6H. Using the git-based Salt Package Manager through a proxy server ### 6H. Using the git-based Salt Package Manager through a proxy server
@ -375,7 +385,7 @@ If required, you can use the `-x <test>` option to skip some erroneous tests.
# 8. Making a DMG installer # 8. Making a DMG installer
You can make a DMG installer using another Python script **`makeDMG4mac.py`**.<br> You can make a DMG installer using another Python script **`makeDMG4mac.py`**.<br>
This script requires a directory generated by **`build4mac.py`** with the [-y|-Y] option (refer to 6B through 6E). This script requires a directory generated by **`build4mac.py`** with the [-y|-Y] option (refer to 6A through 6F).
1. Make a symbolic link (if it does not exist) from the parent directory (where **`build.sh`** exists) to **`makeDMG4mac.py`**, that is, 1. Make a symbolic link (if it does not exist) from the parent directory (where **`build.sh`** exists) to **`makeDMG4mac.py`**, that is,
``` ```
@ -384,11 +394,11 @@ makeDMG4mac.py -> macbuild/makeDMG4mac.py
2. Invoke **`makeDMG4mac.py`** with -p and -m options, for example, 2. Invoke **`makeDMG4mac.py`** with -p and -m options, for example,
``` ```
$ cd /where/'build.sh'/exists $ cd /where/'build.sh'/exists
$ ./makeDMG4mac.py -p LW-qt5MP.pkg.macos-Monterey-release-Rmp33Pmp311 -m $ ./makeDMG4mac.py -p LW-qt5MP.pkg.macos-Sonoma-release-Rmp33Pmp312 -m
``` ```
This command will generate the two files below:<br> This command will generate the two files below:<br>
* **`LW-klayout-0.29.0-macOS-Monterey-1-qt5MP-Rmp33Pmp311.dmg`** ---(1) the main DMG file * **`LW-klayout-0.29.7-macOS-Sonoma-1-qt5MP-Rmp33Pmp312.dmg`** ---(1) the main DMG file
* **`LW-klayout-0.29.0-macOS-Monterey-1-qt5MP-Rmp33Pmp311.dmg.md5`** ---(2) MD5-value text file * **`LW-klayout-0.29.7-macOS-Sonoma-1-qt5MP-Rmp33Pmp312.dmg.md5`** ---(2) MD5-value text file
# Known issues # Known issues
Because we assume some specific versions of non-OS-standard Ruby and Python, updating Homebrew, MacPorts, or Anaconda3 may cause build- and link errors.<br> Because we assume some specific versions of non-OS-standard Ruby and Python, updating Homebrew, MacPorts, or Anaconda3 may cause build- and link errors.<br>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 201 KiB

View File

@ -5,7 +5,7 @@
# File: "macbuild/build4mac.py" # File: "macbuild/build4mac.py"
# #
# The top Python script for building KLayout (http://www.klayout.de/index.php) # The top Python script for building KLayout (http://www.klayout.de/index.php)
# version 0.29.0 or later on different Apple Mac OSX platforms. # version 0.29.7 or later on different Apple Mac OSX platforms.
#=============================================================================== #===============================================================================
import sys import sys
import os import os
@ -34,7 +34,7 @@ from build4mac_util import *
# @return (usage, moduleset)-tuple # @return (usage, moduleset)-tuple
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
def GenerateUsage(platform): def GenerateUsage(platform):
if platform.upper() in [ "SONOMA", "VENTURA", "MONTEREY" ]: # with Xcode [13.1 .. ] if platform.upper() in [ "SEQUOIA", "SONOMA", "VENTURA", "MONTEREY" ]: # with Xcode [13.1 .. ]
myQt56 = "qt5macports" myQt56 = "qt5macports"
myRuby = "sys" myRuby = "sys"
myPython = "sys" myPython = "sys"
@ -43,58 +43,58 @@ def GenerateUsage(platform):
raise Exception( "! Too obsolete platform <%s>" % platform ) raise Exception( "! Too obsolete platform <%s>" % platform )
usage = "\n" usage = "\n"
usage += "---------------------------------------------------------------------------------------------------------\n" usage += "-----------------------------------------------------------------------------------------------------------\n"
usage += "<< Usage of 'build4mac.py' >>\n" usage += "<< Usage of 'build4mac.py' >>\n"
usage += " for building KLayout 0.29.0 or later on different Apple macOS platforms.\n" usage += " for building KLayout 0.29.7 or later on different Apple macOS platforms.\n"
usage += "\n" usage += "\n"
usage += "$ [python] ./build4mac.py\n" usage += "$ [python] ./build4mac.py\n"
usage += " option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details)| default value\n" usage += " option & argument : descriptions (refer to 'macbuild/build4mac_env.py' for details) | default value\n"
usage += " --------------------------------------------------------------------------------------+---------------\n" usage += " ----------------------------------------------------------------------------------------+---------------\n"
usage += " [-q|--qt <type>] : case-insensitive type=['Qt5MacPorts', 'Qt5Brew', 'Qt5Ana3', | %s\n" % myQt56 usage += " [-q|--qt <type>] : case-insensitive type=['Qt5MacPorts', 'Qt5Brew', 'Qt5Ana3', | %s\n" % myQt56
usage += " : 'Qt6MacPorts', 'Qt6Brew'] |\n" usage += " : 'Qt6MacPorts', 'Qt6Brew'] |\n"
usage += " : Qt5MacPorts: use Qt5 from MacPorts |\n" usage += " : Qt5MacPorts: use Qt5 from MacPorts |\n"
usage += " : Qt5Brew: use Qt5 from Homebrew |\n" usage += " : Qt5Brew: use Qt5 from Homebrew |\n"
usage += " : Qt5Ana3: use Qt5 from Anaconda3 |\n" usage += " : Qt5Ana3: use Qt5 from Anaconda3 |\n"
usage += " : Qt6MacPorts: use Qt6 from MacPorts (*) |\n" usage += " : Qt6MacPorts: use Qt6 from MacPorts (*) |\n"
usage += " : Qt6Brew: use Qt6 from Homebrew (*) |\n" usage += " : Qt6Brew: use Qt6 from Homebrew (*) |\n"
usage += " : (*) migration to Qt6 is ongoing |\n" usage += " : (*) migration to Qt6 is ongoing |\n"
usage += " [-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP33', 'HB33', 'Ana3'] | %s\n" % myRuby usage += " [-r|--ruby <type>] : case-insensitive type=['nil', 'Sys', 'MP33', 'HB33', 'Ana3'] | %s\n" % myRuby
usage += " : nil: don't bind Ruby |\n" usage += " : nil: don't bind Ruby |\n"
usage += " : Sys: use [Sonoma|Ventura|Monterey]-bundled Ruby 2.6 |\n" usage += " : Sys: use [Sequoia|Sonoma|Ventura|Monterey]-bundled Ruby 2.6 |\n"
usage += " : MP33: use Ruby 3.3 from MacPorts |\n" usage += " : MP33: use Ruby 3.3 from MacPorts |\n"
usage += " : HB33: use Ruby 3.3 from Homebrew |\n" usage += " : HB33: use Ruby 3.3 from Homebrew |\n"
usage += " : Ana3: use Ruby 3.2 from Anaconda3 |\n" usage += " : Ana3: use Ruby 3.2 from Anaconda3 |\n"
usage += " [-p|--python <type>] : case-insensitive type=['nil', 'Sys', 'MP311', 'HB311', 'Ana3', | %s\n" % myPython usage += " [-p|--python <type>] : case-insensitive type=['nil', 'Sys', 'MP312', 'HB312', 'Ana3', | %s\n" % myPython
usage += " : 'MP39', 'HB39', 'HBAuto'] |\n" usage += " : 'MP311', 'HB311', 'HBAuto'] |\n"
usage += " : nil: don't bind Python |\n" usage += " : nil: don't bind Python |\n"
usage += " : Sys: use [Sonoma|Ventura|Monterey]-bundled Python 3.9 |\n" usage += " : Sys: use [Sequoia|Sonoma|Ventura|Monterey]-bundled Python 3.9 |\n"
usage += " : MP311: use Python 3.11 from MacPorts |\n" usage += " : MP312: use Python 3.12 from MacPorts |\n"
usage += " : HB311: use Python 3.11 from Homebrew |\n" usage += " : HB312: use Python 3.12 from Homebrew |\n"
usage += " : Ana3: use Python 3.11 from Anaconda3 |\n" usage += " : Ana3: use Python 3.12 from Anaconda3 |\n"
usage += " : MP39: use Python 3.9 from MacPorts (+) |\n" usage += " : MP311: use Python 3.11 from MacPorts |\n"
usage += " : HB39: use Python 3.9 from Homebrew (+) |\n" usage += " : HB311: use Python 3.11 from Homebrew (+) |\n"
usage += " : (+) for the backward compatibility tests |\n" usage += " : (+) required to provide the legacy pip in HW-*.dmg |\n"
usage += " : HBAuto: use the latest Python 3.x auto-detected from Homebrew |\n" usage += " : HBAuto: use the latest Python 3.x auto-detected from Homebrew |\n"
usage += " [-P|--buildPymod] : build and deploy Pymod (*.whl) for LW-*.dmg | disabled\n" usage += " [-P|--buildPymod] : build and deploy Pymod (*.whl) for LW-*.dmg | disabled\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 += " [-u|--noqtuitools] : don't include uitools in Qt binding | disabled\n" usage += " [-u|--noqtuitools] : don't include uitools in Qt binding | disabled\n"
usage += " [-g|--nolibgit2] : don't include libgit2 for Git package support | disabled\n" usage += " [-g|--nolibgit2] : don't include libgit2 for Git package support | disabled\n"
usage += " [-m|--make <option>] : option passed to 'make' | '--jobs=4'\n" usage += " [-m|--make <option>] : option passed to 'make' | '--jobs=4'\n"
usage += " [-d|--debug] : enable debug mode build; AddressSanitizer (ASAN) is linked | disabled\n" usage += " [-d|--debug] : enable debug mode build; AddressSanitizer (ASAN) is linked | disabled\n"
usage += " [-c|--checkcom] : check command-line and exit without building | disabled\n" usage += " [-c|--checkcom] : check command-line and exit without building | disabled\n"
usage += " [-y|--deploy] : deploy executables and dylibs, including Qt's Frameworks | disabled\n" usage += " [-y|--deploy] : deploy executables and dylibs, including Qt's Frameworks | disabled\n"
usage += " [-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled\n" usage += " [-Y|--DEPLOY] : deploy executables and dylibs for those who built KLayout | disabled\n"
usage += " : from the source code and use the tools in the same machine |\n" usage += " : from the source code and use the tools in the same machine |\n"
usage += " : ! After confirmation of the successful build of 'klayout.app', |\n" usage += " : ! After confirmation of the successful build of 'klayout.app', |\n"
usage += " : rerun this script with BOTH: |\n" usage += " : 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> OR <-Y|--DEPLOY> |\n" usage += " : 2) <-y|--deploy> OR <-Y|--DEPLOY> |\n"
usage += " : optionally with [-v|--verbose <0-3>] |\n" usage += " : optionally with [-v|--verbose <0-3>] |\n"
usage += " [-v|--verbose <0-3>] : verbose level of `macdeployqt' (effective with -y only) | 1\n" usage += " [-v|--verbose <0-3>] : verbose level of `macdeployqt' (effective with -y only) | 1\n"
usage += " : 0 = no output, 1 = error/warning (default), |\n" usage += " : 0 = no output, 1 = error/warning (default), |\n"
usage += " : 2 = normal, 3 = debug |\n" usage += " : 2 = normal, 3 = debug |\n"
usage += " [-?|--?] : print this usage and exit; in zsh, quote like '-?' or '--?' | disabled\n" usage += " [-?|--?] : print this usage and exit; in zsh, quote like '-?' or '--?' | disabled\n"
usage += "-----------------------------------------------------------------------------------------+---------------\n" usage += "-------------------------------------------------------------------------------------------+---------------\n"
return (usage, moduleset) return (usage, moduleset)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -117,7 +117,9 @@ def Get_Default_Config():
# Dropped [ElCapitan - BigSur] (2023-10-24). # Dropped [ElCapitan - BigSur] (2023-10-24).
# See 415b5aa2efca04928f1148a69e77efd5d76f8c1d for the previous states. # See 415b5aa2efca04928f1148a69e77efd5d76f8c1d for the previous states.
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
if release == 23: if release == 24:
Platform = "Sequoia"
elif release == 23:
Platform = "Sonoma" Platform = "Sonoma"
elif release == 22: elif release == 22:
Platform = "Ventura" Platform = "Ventura"
@ -131,7 +133,8 @@ def Get_Default_Config():
sys.exit(1) sys.exit(1)
if not Machine == "x86_64": if not Machine == "x86_64":
if Machine == "arm64" and Platform in ["Sonoma", "Ventura", "Monterey"]: # with an Apple Silicon Chip # with an Apple Silicon Chip?
if Machine == "arm64" and Platform in ["Sequoia", "Sonoma", "Ventura", "Monterey"]:
print("") print("")
print( "### Your Mac equips an Apple Silicon Chip ###" ) print( "### Your Mac equips an Apple Silicon Chip ###" )
print( " Setting QMAKE_APPLE_DEVICE_ARCHS=arm64\n") print( " Setting QMAKE_APPLE_DEVICE_ARCHS=arm64\n")
@ -149,7 +152,11 @@ def Get_Default_Config():
ToolDebug = list() ToolDebug = list()
# Set the default modules # Set the default modules
if Platform == "Sonoma": if Platform == "Sequoia":
ModuleQt = "Qt5MacPorts"
ModuleRuby = "Sys"
ModulePython = "Sys"
elif Platform == "Sonoma":
ModuleQt = "Qt5MacPorts" ModuleQt = "Qt5MacPorts"
ModuleRuby = "Sys" ModuleRuby = "Sys"
ModulePython = "Sys" ModulePython = "Sys"
@ -179,8 +186,7 @@ def Get_Default_Config():
PackagePrefix = "" PackagePrefix = ""
DeployVerbose = 1 DeployVerbose = 1
Version = GetKLayoutVersionFrom( "./version.sh" ) Version = GetKLayoutVersionFrom( "./version.sh" )
HBPythonIs39 = False # because ModulePython == "Python311Brew" by default OSPython3FW = None # system Python3 frameworks in [ None, MontereyPy3FW, VenturaPy3FW, SonomaPy3FW, SequoiaPy3FW ]
OSPython3FW = None # system Python3 frameworks in [ None, MontereyPy3FW, VenturaPy3FW, SonomaPy3FW ]
EmbedQt = False EmbedQt = False
EmbedPython3 = False EmbedPython3 = False
@ -207,8 +213,7 @@ def Get_Default_Config():
config['Version'] = Version # KLayout's version config['Version'] = Version # KLayout's version
config['ModuleSet'] = ModuleSet # (Qt, Ruby, Python)-tuple config['ModuleSet'] = ModuleSet # (Qt, Ruby, Python)-tuple
config['ToolDebug'] = ToolDebug # debug level list for this tool config['ToolDebug'] = ToolDebug # debug level list for this tool
config['HBPythonIs39'] = HBPythonIs39 # True if the Homebrew Python version <= 3.9 config['OSPython3FW'] = OSPython3FW # system Python3 frameworks in [ None, MontereyPy3FW, VenturaPy3FW, SonomaPy3FW, SequoiaPy3FW ]
config['OSPython3FW'] = OSPython3FW # system Python3 frameworks in [ None, MontereyPy3FW, VenturaPy3FW, SonomaPy3FW ]
config['EmbedQt'] = EmbedQt # True if Qt is embedded config['EmbedQt'] = EmbedQt # True if Qt is embedded
config['EmbedPython3'] = EmbedPython3 # True if Python3 is embedded config['EmbedPython3'] = EmbedPython3 # True if Python3 is embedded
# auxiliary variables on platform # auxiliary variables on platform
@ -252,7 +257,6 @@ def Parse_CLI_Args(config):
DeployVerbose = config['DeployVerbose'] DeployVerbose = config['DeployVerbose']
ModuleSet = config['ModuleSet'] ModuleSet = config['ModuleSet']
ToolDebug = config['ToolDebug'] ToolDebug = config['ToolDebug']
HBPythonIs39 = config['HBPythonIs39']
OSPython3FW = config['OSPython3FW'] OSPython3FW = config['OSPython3FW']
EmbedQt = config['EmbedQt'] EmbedQt = config['EmbedQt']
EmbedPython3 = config['EmbedPython3'] EmbedPython3 = config['EmbedPython3']
@ -271,7 +275,7 @@ def Parse_CLI_Args(config):
p.add_option( '-p', '--python', p.add_option( '-p', '--python',
dest='type_python', dest='type_python',
help="Python type=['nil', 'Sys', 'MP311', 'HB311', 'Ana3', 'MP39', 'HB39', 'HBAuto']" ) help="Python type=['nil', 'Sys', 'MP312', 'HB312', 'Ana3', 'MP311', 'HB311', 'HBAuto']" )
p.add_option( '-P', '--buildPymod', p.add_option( '-P', '--buildPymod',
action='store_true', action='store_true',
@ -340,7 +344,7 @@ def Parse_CLI_Args(config):
default=False, default=False,
help='check usage' ) help='check usage' )
if Platform.upper() in [ "SONOMA", "VENTURA", "MONTEREY" ]: # with Xcode [13.1 .. ] if Platform.upper() in [ "SEQUOIA", "SONOMA", "VENTURA", "MONTEREY" ]: # with Xcode [13.1 .. ]
p.set_defaults( type_qt = "qt5macports", p.set_defaults( type_qt = "qt5macports",
type_ruby = "sys", type_ruby = "sys",
type_python = "sys", type_python = "sys",
@ -413,7 +417,9 @@ def Parse_CLI_Args(config):
if choiceRuby == "nil": if choiceRuby == "nil":
ModuleRuby = 'nil' ModuleRuby = 'nil'
elif choiceRuby == "Sys": elif choiceRuby == "Sys":
if Platform == "Sonoma": if Platform == "Sequoia":
ModuleRuby = 'RubySequoia'
elif Platform == "Sonoma":
ModuleRuby = 'RubySonoma' ModuleRuby = 'RubySonoma'
elif Platform == "Ventura": elif Platform == "Ventura":
ModuleRuby = 'RubyVentura' ModuleRuby = 'RubyVentura'
@ -439,11 +445,11 @@ def Parse_CLI_Args(config):
candidates = dict() candidates = dict()
candidates['NIL'] = 'nil' candidates['NIL'] = 'nil'
candidates['SYS'] = 'Sys' candidates['SYS'] = 'Sys'
candidates['MP312'] = 'MP312'
candidates['HB312'] = 'HB312'
candidates['ANA3'] = 'Ana3'
candidates['MP311'] = 'MP311' candidates['MP311'] = 'MP311'
candidates['HB311'] = 'HB311' candidates['HB311'] = 'HB311'
candidates['ANA3'] = 'Ana3'
candidates['MP39'] = 'MP39'
candidates['HB39'] = 'HB39'
candidates['HBAUTO'] = 'HBAuto' candidates['HBAUTO'] = 'HBAuto'
try: try:
choicePython = candidates[ opt.type_python.upper() ] choicePython = candidates[ opt.type_python.upper() ]
@ -454,49 +460,38 @@ def Parse_CLI_Args(config):
ModulePython = '' ModulePython = ''
if choicePython == "nil": if choicePython == "nil":
ModulePython = 'nil' ModulePython = 'nil'
HBPythonIs39 = None
OSPython3FW = None OSPython3FW = None
elif choicePython == "Sys": elif choicePython == "Sys":
if Platform == "Sonoma": if Platform == "Sequoia":
ModulePython = 'PythonSequoia'
OSPython3FW = SequoiaPy3FW
elif Platform == "Sonoma":
ModulePython = 'PythonSonoma' ModulePython = 'PythonSonoma'
HBPythonIs39 = None
OSPython3FW = SonomaPy3FW OSPython3FW = SonomaPy3FW
elif Platform == "Ventura": elif Platform == "Ventura":
ModulePython = 'PythonVentura' ModulePython = 'PythonVentura'
HBPythonIs39 = None
OSPython3FW = VenturaPy3FW OSPython3FW = VenturaPy3FW
elif Platform == "Monterey": elif Platform == "Monterey":
ModulePython = 'PythonMonterey' ModulePython = 'PythonMonterey'
HBPythonIs39 = None
OSPython3FW = MontereyPy3FW OSPython3FW = MontereyPy3FW
elif choicePython == "MP311": elif choicePython == "MP312":
ModulePython = 'Python311MacPorts' ModulePython = 'Python312MacPorts'
HBPythonIs39 = None
OSPython3FW = None OSPython3FW = None
NonOSStdLang = True NonOSStdLang = True
elif choicePython == "HB311": elif choicePython == "HB312":
ModulePython = 'Python311Brew' ModulePython = 'Python312Brew'
HBPythonIs39 = False
OSPython3FW = None OSPython3FW = None
NonOSStdLang = True NonOSStdLang = True
elif choicePython == "Ana3": elif choicePython == "Ana3":
ModulePython = 'PythonAnaconda3' ModulePython = 'PythonAnaconda3'
HBPythonIs39 = None
OSPython3FW = None OSPython3FW = None
NonOSStdLang = True NonOSStdLang = True
elif choicePython == "MP39": elif choicePython == "HB311":
ModulePython = 'Python39MacPorts' ModulePython = 'Python311Brew'
HBPythonIs39 = None
OSPython3FW = None
NonOSStdLang = True
elif choicePython == "HB39":
ModulePython = 'Python39Brew'
HBPythonIs39 = True
OSPython3FW = None OSPython3FW = None
NonOSStdLang = True NonOSStdLang = True
elif choicePython == "HBAuto": elif choicePython == "HBAuto":
ModulePython = 'PythonAutoBrew' ModulePython = 'PythonAutoBrew'
HBPythonIs39 = (HBPythonAutoVersion == "3.9")
OSPython3FW = None OSPython3FW = None
NonOSStdLang = True NonOSStdLang = True
if ModulePython == '': if ModulePython == '':
@ -566,14 +561,13 @@ def Parse_CLI_Args(config):
PackagePrefix = "ST-" PackagePrefix = "ST-"
EmbedQt = True EmbedQt = True
message += "a standard (ST-) package including Qt[5|6] and using OS-bundled Ruby and Python..." message += "a standard (ST-) package including Qt[5|6] and using OS-bundled Ruby and Python..."
elif ModulePython in ['Python311Brew', 'Python39Brew', 'PythonAutoBrew']: elif ModulePython in ['Python311Brew', 'PythonAutoBrew']:
PackagePrefix = "HW-" PackagePrefix = "HW-"
EmbedQt = True EmbedQt = True
EmbedPython3 = True EmbedPython3 = True
message += "a heavyweight (HW-) package including Qt[5|6] and Python3.[11|9] from Homebrew..." message += "a heavyweight (HW-) package including Qt[5|6] and Python3.[11] from Homebrew..."
okHWdmg = (ModulePython == 'Python311Brew') or \ okHWdmg = (ModulePython == 'Python311Brew') or \
(ModulePython == 'Python39Brew') or \ (ModulePython == 'PythonAutoBrew' and HBPythonAutoVersion in ["3.11"] )
(ModulePython == 'PythonAutoBrew' and HBPythonAutoVersion in ["3.11", "3.9"] )
else: else:
PackagePrefix = "EX-" PackagePrefix = "EX-"
message += "a package with exceptional (EX-) combinations of different modules..." message += "a package with exceptional (EX-) combinations of different modules..."
@ -583,7 +577,7 @@ def Parse_CLI_Args(config):
if not okHWdmg: if not okHWdmg:
print( "!!! HW-dmg package assumes the two conditions:" ) print( "!!! HW-dmg package assumes the two conditions:" )
print( " (1) either Qt5 or Qt6 from MacPorts or Homebrew (Anaconda3 is not a candidate)" ) print( " (1) either Qt5 or Qt6 from MacPorts or Homebrew (Anaconda3 is not a candidate)" )
print( " (2) either python@3.11 or python@3.9 from Homebrew" ) print( " (2) python@3.11 from Homebrew" )
sys.exit(1) sys.exit(1)
if CheckComOnly: if CheckComOnly:
sys.exit(0) sys.exit(0)
@ -610,7 +604,6 @@ def Parse_CLI_Args(config):
config['DeployVerbose'] = DeployVerbose config['DeployVerbose'] = DeployVerbose
config['ModuleSet'] = ModuleSet config['ModuleSet'] = ModuleSet
config['ToolDebug'] = ToolDebug config['ToolDebug'] = ToolDebug
config['HBPythonIs39'] = HBPythonIs39
config['OSPython3FW'] = OSPython3FW config['OSPython3FW'] = OSPython3FW
config['EmbedQt'] = EmbedQt config['EmbedQt'] = EmbedQt
config['EmbedPython3'] = EmbedPython3 config['EmbedPython3'] = EmbedPython3
@ -688,7 +681,7 @@ def Get_Build_Parameters(config):
parameters['qt_lib_root'] = Qt56Dictionary[ModuleQt]['libdir'] parameters['qt_lib_root'] = Qt56Dictionary[ModuleQt]['libdir']
# (E) rpath # (E) rpath
if OSPython3FW in [ MontereyPy3FW, VenturaPy3FW, SonomaPy3FW ]: if OSPython3FW in [ MontereyPy3FW, VenturaPy3FW, SonomaPy3FW, SequoiaPy3FW ]:
parameters['rpath'] = OSPython3FW parameters['rpath'] = OSPython3FW
else: else:
parameters['rpath'] = "@executable_path/../Frameworks" parameters['rpath'] = "@executable_path/../Frameworks"
@ -736,10 +729,10 @@ def Get_Build_Parameters(config):
# (L) Extra parameters needed for <pymod> # (L) Extra parameters needed for <pymod>
# <pymod> will be built if: # <pymod> will be built if:
# BuildPymodWhl = True # BuildPymodWhl = True
# Platform = [ 'Sonoma', 'Ventura', 'Monterey'] # Platform = [ 'Sequoia', 'Sonoma', 'Ventura', 'Monterey']
# ModuleRuby = [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ] # ModuleRuby = [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ]
# ModulePython = [ 'Python311MacPorts', 'Python39MacPorts', # ModulePython = [ 'Python312MacPorts', 'Python311MacPorts',
# 'Python311Brew', Python39Brew', 'PythonAutoBrew', # 'Python311Brew',
# 'PythonAnaconda3' ] # 'PythonAnaconda3' ]
parameters['BuildPymodWhl'] = BuildPymodWhl parameters['BuildPymodWhl'] = BuildPymodWhl
parameters['Platform'] = Platform parameters['Platform'] = Platform
@ -747,11 +740,11 @@ def Get_Build_Parameters(config):
parameters['ModulePython'] = ModulePython parameters['ModulePython'] = ModulePython
PymodDistDir = dict() PymodDistDir = dict()
if Platform in [ 'Sonoma', 'Ventura', 'Monterey' ]: if Platform in [ 'Sequoia', 'Sonoma', 'Ventura', 'Monterey' ]:
if ModuleRuby in [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ]: if ModuleRuby in [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ]:
if ModulePython in [ 'Python311MacPorts', 'Python39MacPorts' ]: if ModulePython in [ 'Python312MacPorts', 'Python311MacPorts' ]:
PymodDistDir[ModulePython] = 'dist-MP3-%s' % ModuleQt PymodDistDir[ModulePython] = 'dist-MP3-%s' % ModuleQt
elif ModulePython in [ 'Python311Brew', 'Python39Brew', 'PythonAutoBrew' ]: elif ModulePython in [ 'Python311Brew' ]:
PymodDistDir[ModulePython] = 'dist-HB3-%s' % ModuleQt PymodDistDir[ModulePython] = 'dist-HB3-%s' % ModuleQt
elif ModulePython in [ 'PythonAnaconda3' ]: elif ModulePython in [ 'PythonAnaconda3' ]:
PymodDistDir[ModulePython] = 'dist-ana3-%s' % ModuleQt PymodDistDir[ModulePython] = 'dist-ana3-%s' % ModuleQt
@ -770,10 +763,10 @@ def Build_pymod_wheel(parameters):
#----------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------
# [1] <pymod> will be built if: # [1] <pymod> will be built if:
# BuildPymodWhl = True # BuildPymodWhl = True
# Platform = [ 'Sonoma', 'Ventura', 'Monterey'] # Platform = [ 'Sequoia', 'Sonoma', 'Ventura', 'Monterey']
# ModuleRuby = [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ] # ModuleRuby = [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ]
# ModulePython = [ 'Python311MacPorts', 'Python39MacPorts', # ModulePython = [ 'Python312MacPorts', 'Python311MacPorts',
# 'Python311Brew', Python39Brew', 'PythonAutoBrew', # 'Python311Brew',
# 'PythonAnaconda3' ] # 'PythonAnaconda3' ]
#----------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------
BuildPymodWhl = parameters['BuildPymodWhl'] BuildPymodWhl = parameters['BuildPymodWhl']
@ -782,12 +775,13 @@ def Build_pymod_wheel(parameters):
ModulePython = parameters['ModulePython'] ModulePython = parameters['ModulePython']
if not BuildPymodWhl: if not BuildPymodWhl:
return 0 return 0
if not Platform in [ 'Sonoma', 'Ventura', 'Monterey' ]: if not Platform in [ 'Sequoia', 'Sonoma', 'Ventura', 'Monterey' ]:
return 0 return 0
elif not ModuleRuby in [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ]: elif not ModuleRuby in [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ]:
return 0 return 0
elif not ModulePython in [ 'Python311MacPorts', 'Python39MacPorts', 'PythonAnaconda3', \ elif not ModulePython in [ 'Python312MacPorts', 'Python311MacPorts', \
'Python311Brew', 'Python39Brew', 'PythonAutoBrew' ]: 'Python311Brew', \
'PythonAnaconda3' ]:
return 0 return 0
#-------------------------------------------------------------------- #--------------------------------------------------------------------
@ -929,7 +923,7 @@ def Build_pymod_wheel(parameters):
# Refer to: https://github.com/Kazzz-S/klayout/issues/49#issuecomment-1432154118 # Refer to: https://github.com/Kazzz-S/klayout/issues/49#issuecomment-1432154118
# https://pypi.org/project/delocate/ # https://pypi.org/project/delocate/
#--------------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------------
cmd3_args = glob.glob( "dist/*.whl" ) # like ['dist/klayout-0.29.0-cp311-cp311-macosx_12_0_x86_64.whl'] cmd3_args = glob.glob( "dist/*.whl" ) # like ['dist/klayout-0.29.7-cp312-cp312-macosx_12_0_x86_64.whl']
if len(cmd3_args) == 1: if len(cmd3_args) == 1:
command3 = "time" command3 = "time"
command3 += " \\\n %s \\\n" % deloc_cmd command3 += " \\\n %s \\\n" % deloc_cmd
@ -959,13 +953,13 @@ def Build_pymod_wheel(parameters):
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# [5-C] Forcibly change the wheel file name for anaconda3 # [5-C] Forcibly change the wheel file name for anaconda3
# Ref. https://github.com/Kazzz-S/klayout/issues/53 # Ref. https://github.com/Kazzz-S/klayout/issues/53
# original: klayout-0.29.0-cp311-cp311-macosx_12_0_x86_64.whl # original: klayout-0.29.7-cp312-cp312-macosx_12_0_x86_64.whl
# | # |
# V # V
# new: klayout-0.29.0-cp311-cp311-macosx_10_9_x86_64.whl # new: klayout-0.29.7-cp312-cp312-macosx_10_9_x86_64.whl
#------------------------------------------------------------------------ #------------------------------------------------------------------------
if whlTarget == "ana3": if whlTarget == "ana3":
wheels = glob.glob( "dist/*.whl" ) # like ['dist/klayout-0.29.0-cp311-cp311-macosx_12_0_x86_64.whl'] wheels = glob.glob( "dist/*.whl" ) # like ['dist/klayout-0.29.7-cp312-cp312-macosx_12_0_x86_64.whl']
if not len(wheels) == 1: if not len(wheels) == 1:
print( "", file=sys.stderr ) print( "", file=sys.stderr )
print( "-------------------------------------------------------------", file=sys.stderr ) print( "-------------------------------------------------------------", file=sys.stderr )
@ -1225,7 +1219,6 @@ def Deploy_Binaries_For_Bundle(config, parameters):
ModuleRuby = config['ModuleRuby'] ModuleRuby = config['ModuleRuby']
ModulePython = config['ModulePython'] ModulePython = config['ModulePython']
ToolDebug = config['ToolDebug'] ToolDebug = config['ToolDebug']
HBPythonIs39 = config['HBPythonIs39']
EmbedQt = config['EmbedQt'] EmbedQt = config['EmbedQt']
EmbedPython3 = config['EmbedPython3'] EmbedPython3 = config['EmbedPython3']
@ -1601,8 +1594,8 @@ def Deploy_Binaries_For_Bundle(config, parameters):
regQt = re.compile(patQt) regQt = re.compile(patQt)
# (4) Python frameworks (only for Homebrew) # in the case of Intel Mac... # (4) Python frameworks (only for Homebrew) # in the case of Intel Mac...
libPy3_1 = "%s/" % HBPython311FrameworkPath # /usr/local/opt/python@3.11/Frameworks/Python.framework/ libPy3_1 = "%s/" % HBPython312FrameworkPath # /usr/local/opt/python@3.12/Frameworks/Python.framework/
libPy3_2 = "%s/" % HBPython39FrameworkPath # /usr/local/opt/python@3.9/Frameworks/Python.framework/ libPy3_2 = "%s/" % HBPython311FrameworkPath # /usr/local/opt/python@3.11/Frameworks/Python.framework/
patPy3 = r'^(%s|%s)(.+)' % (libPy3_1, libPy3_2) patPy3 = r'^(%s|%s)(.+)' % (libPy3_1, libPy3_2)
regPy3 = re.compile(patPy3) regPy3 = re.compile(patPy3)
@ -1837,56 +1830,50 @@ def Deploy_Binaries_For_Bundle(config, parameters):
return 1 return 1
#----------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------
# [9] Special deployment of Python3.8 or newer from Homebrew # [9] Special deployment of Python3.11 from Homebrew
# To use Python3.8 from Homebrew on Catalina... # To use Python3.1 from Homebrew on Sonoma...
# in "/usr/local/opt/python@3.8/lib/" # in "/usr/local/opt/python@3.11/lib/"
# Python.framework -> ../Frameworks/Python.framework/ <=== this symbolic was needed # Python.framework -> ../Frameworks/Python.framework/ <=== this symbolic was needed
# pkgconfig/ # pkgconfig/
# #
# Use the "python3HB.py" tool to make different symbolic links [*] including the above one. # Use the "python3HB.py" tool to make different symbolic links [*] including the above one.
# Catalina0{kazzz-s} lib (1)% pwd # Sonoma{kazzz-s} lib (1)% pwd
# /usr/local/opt/python@3.8/lib # /usr/local/opt/python@3.11/lib
# Catalina0{kazzz-s} lib (2)% ll # Sonoma{kazzz-s} lib (2)% ll
# total 0 # total 0
# drwxr-xr-x 4 kazzz-s admin 128 12 16 21:40 . # drwxr-xr-x 4 kazzz-s admin 128 9 21 23:03 .
# drwxr-xr-x 13 kazzz-s admin 416 12 12 23:08 .. # drwxr-xr-x 14 kazzz-s admin 448 9 21 18:33 ..
# [*] lrwxr-xr-x 1 kazzz-s admin 31 12 16 21:40 Python.framework -> ../Frameworks/Python.framework/ # [*] lrwxr-xr-x 1 kazzz-s admin 31 9 21 23:03 Python.framework -> ../Frameworks/Python.framework/
# drwxr-xr-x 4 kazzz-s admin 128 12 12 23:08 pkgconfig # drwxr-xr-x 4 kazzz-s admin 128 9 7 10:03 pkgconfig
# #
# Catalina0{kazzz-s} Python.framework (3)% pwd # Sonoma{kazzz-s} Python.framework (3)% pwd
# /usr/local/opt/python@3.8/Frameworks/Python.framework/Versions # /usr/local/opt/python@3.11/Frameworks/Python.framework/Versions
# Catalina0{kazzz-s} Versions (4)% ll # Sonoma{kazzz-s} Versions (4)% ll
# total 0 # total 0
# drwxr-xr-x 4 kazzz-s admin 128 12 16 21:40 . # drwxr-xr-x 4 kazzz-s admin 128 9 21 23:03 .
# drwxr-xr-x 6 kazzz-s admin 192 12 16 21:40 .. # drwxr-xr-x 6 kazzz-s admin 192 9 21 23:03 ..
# drwxr-xr-x 9 kazzz-s admin 288 12 12 23:08 3.8 # drwxr-xr-x 9 kazzz-s admin 288 9 7 10:03 3.11
# [*] lrwxr-xr-x 1 kazzz-s admin 4 12 16 21:40 Current -> 3.8/ # [*] lrwxr-xr-x 1 kazzz-s admin 5 9 21 23:03 Current -> 3.11/
# #
# Catalina0{kazzz-s} Python.framework (5)% pwd # Sonoma{kazzz-s} Python.framework (5)% pwd
# /usr/local/opt/python@3.8/Frameworks/Python.framework # /usr/local/opt/python@3.11/Frameworks/Python.framework
# Catalina0{kazzz-s} Python.framework (6)% ll # Sonoma{kazzz-s} Python.framework (6)% ll
# total 0 # total 0
# drwxr-xr-x 6 kazzz-s admin 192 12 16 21:40 . # drwxr-xr-x 6 kazzz-s admin 192 9 21 23:03 .
# drwxr-xr-x 3 kazzz-s admin 96 12 12 23:07 .. # drwxr-xr-x 3 kazzz-s admin 96 9 7 10:03 ..
# [*] lrwxr-xr-x 1 kazzz-s admin 25 12 16 21:40 Headers -> Versions/Current/Headers/ # [*] lrwxr-xr-x 1 kazzz-s admin 25 9 21 23:03 Headers -> Versions/Current/Headers/
# [*] lrwxr-xr-x 1 kazzz-s admin 23 12 16 21:40 Python -> Versions/Current/Python # [*] lrwxr-xr-x 1 kazzz-s admin 23 9 21 23:03 Python -> Versions/Current/Python
# [*] lrwxr-xr-x 1 kazzz-s admin 27 12 16 21:40 Resources -> Versions/Current/Resources/ # [*] lrwxr-xr-x 1 kazzz-s admin 27 9 21 23:03 Resources -> Versions/Current/Resources/
# drwxr-xr-x 4 kazzz-s admin 128 12 16 21:40 Versions # drwxr-xr-x 4 kazzz-s admin 128 9 21 23:03 Versions
#----------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------
deploymentPython311HB = (ModulePython == 'Python311Brew') deploymentPython311HB = (ModulePython == 'Python311Brew')
deploymentPython39HB = (ModulePython == 'Python39Brew')
deploymentPythonAutoHB = (ModulePython == 'PythonAutoBrew') deploymentPythonAutoHB = (ModulePython == 'PythonAutoBrew')
if (deploymentPython311HB or deploymentPython39HB or deploymentPythonAutoHB) and NonOSStdLang: if (deploymentPython311HB or deploymentPythonAutoHB) and NonOSStdLang:
# from build4mac_util import WalkFrameworkPaths, PerformChanges # from build4mac_util import WalkFrameworkPaths, PerformChanges
# from build4mac_util import Change_Python_LibPath_RelativeToAbsolute, DumpDependencyDic # from build4mac_util import Change_Python_LibPath_RelativeToAbsolute, DumpDependencyDic
if deploymentPython311HB: if deploymentPython311HB:
HBPythonFrameworkPath = HBPython311FrameworkPath HBPythonFrameworkPath = HBPython311FrameworkPath
pythonHBVer = "3.11" # 'pinned' to this version as of KLayout version 0.28.12 (2020-10-27) pythonHBVer = "3.11" # required to provide the legacy pip in HW-*.dmg
elif deploymentPython39HB:
HBPythonFrameworkPath = HBPython39FrameworkPath
pythonHBVer = "3.9" # 'pinned' to this version as of KLayout version 0.28.2 (2023-01-02)
# More specifically, "3.9.17" as of KLayout version 0.28.12 (2023-09-dd)
elif deploymentPythonAutoHB: elif deploymentPythonAutoHB:
HBPythonFrameworkPath = HBPythonAutoFrameworkPath HBPythonFrameworkPath = HBPythonAutoFrameworkPath
pythonHBVer = HBPythonAutoVersion pythonHBVer = HBPythonAutoVersion
@ -1936,15 +1923,12 @@ def Deploy_Binaries_For_Bundle(config, parameters):
print( msg % command, file=sys.stderr ) print( msg % command, file=sys.stderr )
sys.exit(1) sys.exit(1)
if HBPythonIs39 == None or HBPythonIs39 == True: ret = Generate_Start_Console_Py( sourceDir2 + "/template-start-console.py",
shutil.copy2( sourceDir2 + "/start-console.py", targetDirM ) pythonHBVer,
else: targetDirM + "/start-console.py" )
ret = Generate_Start_Console_Py( sourceDir2 + "/template-start-console.py", if ret == False:
pythonHBVer, print( "! Generate_Start_Console_Py() failed", file=sys.stderr )
targetDirM + "/start-console.py" ) return 1
if ret == False:
print( "! Generate_Start_Console_Py() failed", file=sys.stderr )
return 1
shutil.copy2( sourceDir2 + "/klayout_console", targetDirM ) shutil.copy2( sourceDir2 + "/klayout_console", targetDirM )
os.chmod( targetDirM + "/start-console.py", 0o0755 ) os.chmod( targetDirM + "/start-console.py", 0o0755 )
@ -1995,11 +1979,11 @@ def Deploy_Binaries_For_Bundle(config, parameters):
# xz 5.4.4 General-purpose data compression with high compression ratio # xz 5.4.4 General-purpose data compression with high compression ratio
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
# https://formulae.brew.sh/formula/python@3.11 # https://formulae.brew.sh/formula/python@3.11
# as of 2023-10-24, python@3.11 depends on: # as of 2024-09-21, python@3.11 depends on:
# mpdecimal 2.5.1 Library for decimal floating point arithmetic # mpdecimal 4.0.0 Library for decimal floating point arithmetic
# openssl@3 3.1.3 Cryptography and SSL/TLS Toolkit # openssl@3 3.3.2 Cryptography and SSL/TLS Toolkit
# sqlite 3.43.2 Command-line interface for SQLite # sqlite 3.46.1 Command-line interface for SQLite
# xz 5.4.4 General-purpose data compression with high compression ratio # xz 5.6.2 General-purpose data compression with high compression ratio
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
print( " [9.2.4] Patching [mpdecimal, openssl@3, sqlite, xz(, gdbm, readline)]" ) print( " [9.2.4] Patching [mpdecimal, openssl@3, sqlite, xz(, gdbm, readline)]" )
if 924 in ToolDebug: if 924 in ToolDebug:
@ -2130,6 +2114,7 @@ def Deploy_Binaries_For_Bundle(config, parameters):
# However, newer versions of Python deprecate the distutils.cfg file and the distutils module itself. # However, newer versions of Python deprecate the distutils.cfg file and the distutils module itself.
# Ref. https://github.com/Homebrew/homebrew-core/issues/76621 # Ref. https://github.com/Homebrew/homebrew-core/issues/76621
#---------------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------------
"""
if deploymentPython39HB or (HBPythonAutoVersion == "3.9"): # Python == 3.9 if deploymentPython39HB or (HBPythonAutoVersion == "3.9"): # Python == 3.9
print( deploymentPython39HB, HBPythonAutoVersion ) print( deploymentPython39HB, HBPythonAutoVersion )
print( " [9.5.1] Patching distutils/" ) print( " [9.5.1] Patching distutils/" )
@ -2157,14 +2142,14 @@ def Deploy_Binaries_For_Bundle(config, parameters):
if re.match('prefix=', line) is not None: if re.match('prefix=', line) is not None:
continue continue
file.write(line) file.write(line)
"""
elif deploymentPython311HB or (HBPythonAutoVersion == "3.11"): # Python == 3.11 if deploymentPython311HB or (HBPythonAutoVersion == "3.11"): # Python == 3.11
# The above 'distutils.cfg' file does not exist in the distutils/ directory of Python 3.11. # The above 'distutils.cfg' file does not exist in the distutils/ directory of Python 3.11.
# Use a different technique. # Use a different technique.
print( " [9.5.2] In the Python3.11 environment, use an alternative method of patching distutils/" ) print( " [9.5.2] In the Python3.11 environment, use an alternative method of patching distutils/" )
print( " See Contents/MacOS/start-console.py in /Applications/klayout.app/" ) print( " See Contents/MacOS/start-console.py in /Applications/klayout.app/" )
else: # other than ["3.11", "3.9"]; "3.12" <= Python is yet to be tested else: # other than ["3.11"]
print( "!!! HW-dmg package assumes either python@3.11 or python@3.9" ) print( "!!! HW-dmg package assumes python@3.11" )
print( "!!! 'distutils' has been deprecated in 3.12 <= Python" ) print( "!!! 'distutils' has been deprecated in 3.12 <= Python" )
print("") print("")
os.chdir(ProjectDir) os.chdir(ProjectDir)

View File

@ -6,7 +6,7 @@
# #
# Here are dictionaries of ... # Here are dictionaries of ...
# different modules for building KLayout (http://www.klayout.de/index.php) # different modules for building KLayout (http://www.klayout.de/index.php)
# version 0.29.0 or later on different Apple Mac OSX platforms. # version 0.29.7 or later on different Apple Mac OSX platforms.
# #
# This file is imported by 'build4mac.py' script. # This file is imported by 'build4mac.py' script.
#=============================================================================== #===============================================================================
@ -129,7 +129,7 @@ Qt56Dictionary = { 'Qt5MacPorts': Qt5MacPorts,
# for the previous states. # for the previous states.
#----------------------------------------------------- #-----------------------------------------------------
RubyNil = [ 'nil' ] RubyNil = [ 'nil' ]
RubySys = [ 'RubyMonterey', 'RubyVentura', 'RubySonoma' ] RubySys = [ 'RubyMonterey', 'RubyVentura', 'RubySonoma', 'RubySequoia' ]
RubyExt = [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ] RubyExt = [ 'Ruby33MacPorts', 'Ruby33Brew', 'RubyAnaconda3' ]
Rubies = RubyNil + RubySys + RubyExt Rubies = RubyNil + RubySys + RubyExt
@ -178,11 +178,21 @@ RubySonoma = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % SonomaXcSDK 'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % SonomaXcSDK
} }
# Bundled with Sequoia (15.x)
# [Key Type Name] = 'Sys'
SequoiaXcSDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
SequoiaCLTSDK = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
RubySequoia = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % SequoiaXcSDK,
'inc2': '%s/System/Library/Frameworks/Ruby.framework/Headers/ruby' % SequoiaXcSDK,
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % SequoiaXcSDK
}
# Ruby 3.3 from MacPorts (https://www.macports.org/) # Ruby 3.3 from MacPorts (https://www.macports.org/)
# install with 'sudo port install ruby33' # install with 'sudo port install ruby33'
# [Key Type Name] = 'MP33' # [Key Type Name] = 'MP33'
Ruby33MacPorts = { 'exe': '/opt/local/bin/ruby3.3', Ruby33MacPorts = { 'exe': '/opt/local/bin/ruby3.3',
'inc': '/opt/local/include/ruby-3.3.4', 'inc': '/opt/local/include/ruby-3.3.5',
'lib': '/opt/local/lib/libruby.3.3.dylib' 'lib': '/opt/local/lib/libruby.3.3.dylib'
} }
@ -209,6 +219,7 @@ RubyDictionary = { 'nil' : None,
'RubyMonterey' : RubyMonterey, 'RubyMonterey' : RubyMonterey,
'RubyVentura' : RubyVentura, 'RubyVentura' : RubyVentura,
'RubySonoma' : RubySonoma, 'RubySonoma' : RubySonoma,
'RubySequoia' : RubySequoia,
'Ruby33MacPorts': Ruby33MacPorts, 'Ruby33MacPorts': Ruby33MacPorts,
'Ruby33Brew' : Ruby33Brew, 'Ruby33Brew' : Ruby33Brew,
'RubyAnaconda3' : RubyAnaconda3 'RubyAnaconda3' : RubyAnaconda3
@ -223,10 +234,10 @@ RubyDictionary = { 'nil' : None,
# for the previous states. # for the previous states.
#----------------------------------------------------- #-----------------------------------------------------
PythonNil = [ 'nil' ] PythonNil = [ 'nil' ]
PythonSys = [ 'PythonMonterey', 'PythonVentura', 'PythonSonoma' ] PythonSys = [ 'PythonMonterey', 'PythonVentura', 'PythonSonoma', 'PythonSequoia' ]
PythonExt = [ 'Python39MacPorts', 'Python39Brew' ] PythonExt = [ 'Python311MacPorts', 'Python312MacPorts' ]
PythonExt += [ 'Python311MacPorts', 'Python311Brew' ] PythonExt += [ 'Python311Brew', 'Python312Brew', 'PythonAutoBrew' ]
PythonExt += [ 'PythonAnaconda3', 'PythonAutoBrew' ] PythonExt += [ 'PythonAnaconda3' ]
Pythons = PythonNil + PythonSys + PythonExt Pythons = PythonNil + PythonSys + PythonExt
#----------------------------------------------------- #-----------------------------------------------------
@ -259,13 +270,14 @@ PythonSonoma = { 'exe': '%s/Python3.framework/Versions/3.9/bin/python3.9' % S
'lib': '%s/Python3.framework/Versions/3.9/lib/libpython3.9.dylib' % SonomaPy3FW 'lib': '%s/Python3.framework/Versions/3.9/lib/libpython3.9.dylib' % SonomaPy3FW
} }
# Python 3.9 from MacPorts (https://www.macports.org/) # Bundled with Sequoia (15.x)
# install with 'sudo port install python39' # [Key Type Name] = 'Sys'
# [Key Type Name] = 'MP39' SequoiaPy3FWXc = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks"
Python39MacPorts = { 'exe': '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9', SequoiaPy3FW = "/Library/Developer/CommandLineTools/Library/Frameworks"
'inc': '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9', PythonSequoia = { 'exe': '%s/Python3.framework/Versions/3.9/bin/python3.9' % SequoiaPy3FW,
'lib': '/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib' 'inc': '%s/Python3.framework/Versions/3.9/include/python3.9' % SequoiaPy3FW,
} 'lib': '%s/Python3.framework/Versions/3.9/lib/libpython3.9.dylib' % SequoiaPy3FW
}
# Python 3.11 from MacPorts (https://www.macports.org/) # Python 3.11 from MacPorts (https://www.macports.org/)
# install with 'sudo port install python311' # install with 'sudo port install python311'
@ -275,13 +287,12 @@ Python311MacPorts = { 'exe': '/opt/local/Library/Frameworks/Python.framework/Ver
'lib': '/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib' 'lib': '/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib'
} }
# Python 3.9 from Homebrew # Python 3.12 from MacPorts (https://www.macports.org/)
# install with 'brew install python@3.9' # install with 'sudo port install python312'
# [Key Type Name] = 'HB39' # [Key Type Name] = 'MP312'
HBPython39FrameworkPath = '%s/opt/python@3.9/Frameworks/Python.framework' % DefaultHomebrewRoot Python312MacPorts = { 'exe': '/opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12',
Python39Brew = { 'exe': '%s/Versions/3.9/bin/python3.9' % HBPython39FrameworkPath, 'inc': '/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12',
'inc': '%s/Versions/3.9/include/python3.9' % HBPython39FrameworkPath, 'lib': '/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/libpython3.12.dylib'
'lib': '%s/Versions/3.9/lib/libpython3.9.dylib' % HBPython39FrameworkPath
} }
# Python 3.11 from Homebrew # Python 3.11 from Homebrew
@ -293,19 +304,28 @@ Python311Brew = { 'exe': '%s/Versions/3.11/bin/python3.11' % HBPython311Fram
'lib': '%s/Versions/3.11/lib/libpython3.11.dylib' % HBPython311FrameworkPath 'lib': '%s/Versions/3.11/lib/libpython3.11.dylib' % HBPython311FrameworkPath
} }
# Python 3.11 bundled with anaconda3 installed under /Applications/anaconda3/ # Python 3.12 from Homebrew
# install with 'brew install python@3.12'
# [Key Type Name] = 'HB312'
HBPython312FrameworkPath = '%s/opt/python@3.12/Frameworks/Python.framework' % DefaultHomebrewRoot
Python312Brew = { 'exe': '%s/Versions/3.12/bin/python3.12' % HBPython312FrameworkPath,
'inc': '%s/Versions/3.12/include/python3.12' % HBPython312FrameworkPath,
'lib': '%s/Versions/3.12/lib/libpython3.12.dylib' % HBPython312FrameworkPath
}
# Python 3.12 bundled with anaconda3 installed under /Applications/anaconda3/
# The standard installation deploys the tool under $HOME/opt/anaconda3/. # The standard installation deploys the tool under $HOME/opt/anaconda3/.
# If so, you need to make a symbolic link: /Applications/anaconda3 ---> $HOME/opt/anaconda3/ # If so, you need to make a symbolic link: /Applications/anaconda3 ---> $HOME/opt/anaconda3/
# [Key Type Name] = 'Ana3' # [Key Type Name] = 'Ana3'
PythonAnaconda3 = { 'exe': '/Applications/anaconda3/bin/python3.11', PythonAnaconda3 = { 'exe': '/Applications/anaconda3/bin/python3.12',
'inc': '/Applications/anaconda3/include/python3.11', 'inc': '/Applications/anaconda3/include/python3.12',
'lib': '/Applications/anaconda3/lib/libpython3.11.dylib' 'lib': '/Applications/anaconda3/lib/libpython3.12.dylib'
} }
# Latest Python from Homebrew # Latest Python from Homebrew
# install with 'brew install python' # install with 'brew install python'
# There can be multiple candidates such as: (python, python3, python@3, python@3.8, python@3.9, # There can be multiple candidates such as: (python, python3, python@3, python@3.8, python@3.9,
# python@3.10, python@3.11, python@3.12, python@3.13 ) # python@3.10, python@3.12, python@3.12, python@3.13 )
# Hard to tell which is going to be available to the user. Picking the last one. # Hard to tell which is going to be available to the user. Picking the last one.
# [Key Type Name] = 'HBAuto' # [Key Type Name] = 'HBAuto'
HBPythonAutoFrameworkPath = "" HBPythonAutoFrameworkPath = ""
@ -330,19 +350,19 @@ try:
'lib': glob.glob( "%s/%s/lib/*.dylib" % ( HBAutoFrameworkVersionPath, HBPythonAutoVersion ) )[0] 'lib': glob.glob( "%s/%s/lib/*.dylib" % ( HBAutoFrameworkVersionPath, HBPythonAutoVersion ) )[0]
} }
""" """
# when I have [python3, python@3, python@3.8, python@3.9, python@3.10, python@3.11] # when I have [python3, python@3, python@3.11, python@3.12]
print(HBPythonAutoFrameworkPath) print(HBPythonAutoFrameworkPath)
print(HBAutoFrameworkVersionPath) print(HBAutoFrameworkVersionPath)
print(HBPythonAutoVersion) print(HBPythonAutoVersion)
print(PythonAutoBrew) print(PythonAutoBrew)
quit() quit()
/usr/local/opt/python@3.11/Frameworks/Python.framework /usr/local/opt/python@3.12/Frameworks/Python.framework
/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions /usr/local/opt/python@3.12/Frameworks/Python.framework/Versions
3.11 3.12
{ 'exe': '/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/bin/python3.11', { 'exe': '/usr/local/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/bin/python3.12',
'inc': '/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11', 'inc': '/usr/local/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12',
'lib': '/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib' 'lib': '/usr/local/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/lib/libpython3.12.dylib'
} }
""" """
except Exception as e: except Exception as e:
@ -357,11 +377,12 @@ PythonDictionary = { 'nil' : None,
'PythonMonterey' : PythonMonterey, 'PythonMonterey' : PythonMonterey,
'PythonVentura' : PythonVentura, 'PythonVentura' : PythonVentura,
'PythonSonoma' : PythonSonoma, 'PythonSonoma' : PythonSonoma,
'Python39MacPorts' : Python39MacPorts, 'PythonSequoia' : PythonSequoia,
'Python312MacPorts': Python312MacPorts,
'Python312Brew' : Python312Brew,
'PythonAnaconda3' : PythonAnaconda3,
'Python311MacPorts': Python311MacPorts, 'Python311MacPorts': Python311MacPorts,
'Python39Brew' : Python39Brew, 'Python311Brew' : Python311Brew
'Python311Brew' : Python311Brew,
'PythonAnaconda3' : PythonAnaconda3
} }
if _have_Homebrew_Python: if _have_Homebrew_Python:
PythonDictionary['PythonAutoBrew'] = PythonAutoBrew PythonDictionary['PythonAutoBrew'] = PythonAutoBrew

View File

@ -6,7 +6,7 @@
# #
# Here are utility functions and classes ... # Here are utility functions and classes ...
# for building KLayout (http://www.klayout.de/index.php) # for building KLayout (http://www.klayout.de/index.php)
# version 0.29.0 or later on different Apple Mac OSX platforms. # version 0.29.7 or later on different Apple Mac OSX platforms.
# #
# This file is imported by 'build4mac.py' script. # This file is imported by 'build4mac.py' script.
#======================================================================================== #========================================================================================

View File

@ -5,8 +5,8 @@
# File: "macbuild/macQAT.py" # File: "macbuild/macQAT.py"
# #
# The top Python script to run "ut_runner" after building KLayout # The top Python script to run "ut_runner" after building KLayout
# (http://www.klayout.de/index.php) version 0.29.0 or later on different Apple # (http://www.klayout.de/index.php) version 0.29.7 or later on different
# ßMac OSX platforms. # Apple Mac OSX platforms.
# #
# This script must be copied to a "*.macQAT/" directory to run. # This script must be copied to a "*.macQAT/" directory to run.
#=============================================================================== #===============================================================================

View File

@ -4,8 +4,8 @@
# File: "macbuild/macQAT.sh" # File: "macbuild/macQAT.sh"
# #
# The top Bash script to run "ut_runner" after building KLayout # The top Bash script to run "ut_runner" after building KLayout
# (http://www.klayout.de/index.php) version 0.25.17 or later on different Apple # (http://www.klayout.de/index.php) version 0.29.7 or later on different
# Mac OSX platforms. # Apple Mac OSX platforms.
# #
# This script must be copied to a "*.macQAT/" directory to run. # This script must be copied to a "*.macQAT/" directory to run.
#=============================================================================== #===============================================================================

View File

@ -4,8 +4,8 @@
# File: "macbuild/macQAT2.sh" # File: "macbuild/macQAT2.sh"
# #
# The top Bash script to run "ut_runner" after building KLayout # The top Bash script to run "ut_runner" after building KLayout
# (http://www.klayout.de/index.php) version 0.28.17 or later on different Apple # (http://www.klayout.de/index.php) version 0.29.7 or later on different
# Mac OSX platforms. # Apple Mac OSX platforms.
# #
# This script must be copied to a directory that can be found in $PATH. # This script must be copied to a directory that can be found in $PATH.
#=============================================================================== #===============================================================================

View File

@ -78,7 +78,7 @@ def SetGlobals():
Usage = "\n" Usage = "\n"
Usage += "---------------------------------------------------------------------------------------------------------\n" Usage += "---------------------------------------------------------------------------------------------------------\n"
Usage += "<< Usage of 'makeDMG4mac.py' >>\n" Usage += "<< Usage of 'makeDMG4mac.py' >>\n"
Usage += " for making a DMG file of KLayout 0.29.0 or later on different Apple macOS platforms.\n" Usage += " for making a DMG file of KLayout 0.29.7 or later on different Apple macOS platforms.\n"
Usage += "\n" Usage += "\n"
Usage += "$ [python] ./makeDMG4mac.py\n" Usage += "$ [python] ./makeDMG4mac.py\n"
Usage += " option & argument : descriptions | default value\n" Usage += " option & argument : descriptions | default value\n"
@ -106,7 +106,11 @@ def SetGlobals():
release = int( Release.split(".")[0] ) # take the first of ['21', '0', '0'] release = int( Release.split(".")[0] ) # take the first of ['21', '0', '0']
LatestOS = "" LatestOS = ""
if release == 23: if release == 24:
GenOSName = "macOS"
Platform = "Sequoia"
LatestOS = Platform
elif release == 23:
GenOSName = "macOS" GenOSName = "macOS"
Platform = "Sonoma" Platform = "Sonoma"
LatestOS = Platform LatestOS = Platform
@ -126,7 +130,8 @@ def SetGlobals():
sys.exit(1) sys.exit(1)
if not Machine == "x86_64": if not Machine == "x86_64":
if Machine == "arm64" and Platform in ["Sonoma", "Ventura", "Monterey"]: # with an Apple Silicon Chip # with an Apple Silicon Chip?
if Machine == "arm64" and Platform in ["Sequoia", "Sonoma", "Ventura", "Monterey"]:
print("") print("")
print( "### Your Mac equips an Apple Silicon Chip ###" ) print( "### Your Mac equips an Apple Silicon Chip ###" )
print("") print("")
@ -223,7 +228,7 @@ def SetGlobals():
# * LW-qt6MP.pkg.macos-Monterey-release-Rmp33Pmp311 # * LW-qt6MP.pkg.macos-Monterey-release-Rmp33Pmp311
# #
# Generated DMG will be, for example, # Generated DMG will be, for example,
# (1) ---> LW-klayout-0.29.0-macOS-Monterey-1-qt6Brew-Rhb33Phb311.dmg # (1) ---> LW-klayout-0.29.7-macOS-Monterey-1-qt6Brew-Rhb33Phb311.dmg
# #
# @return on success, positive integer in [MB] that tells approx. occupied disc space; # @return on success, positive integer in [MB] that tells approx. occupied disc space;
# on failure, -1 # on failure, -1

View File

@ -30,14 +30,16 @@ import pandas as pd
# #
# @return matching platform name on success; "" on failure # @return matching platform name on success; "" on failure
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def Test_My_Platform( platforms=[ 'Monterey', 'Ventura', 'Sonoma' ] ): def Test_My_Platform( platforms=[ 'Monterey', 'Ventura', 'Sonoma', 'Sequoia'] ):
(System, Node, Release, MacVersion, Machine, Processor) = platform.uname() (System, Node, Release, MacVersion, Machine, Processor) = platform.uname()
if not System == "Darwin": if not System == "Darwin":
return "" return ""
release = int( Release.split(".")[0] ) # take the first of ['21', '0', '0'] release = int( Release.split(".")[0] ) # take the first of ['21', '0', '0']
if release == 23: if release == 24:
Platform = "Sequoia"
elif release == 23:
Platform = "Sonoma" Platform = "Sonoma"
elif release == 22: elif release == 22:
Platform = "Ventura" Platform = "Ventura"
@ -99,15 +101,15 @@ def Get_Build_Options( targetDic, platform ):
buildOp[(qtVer, "std", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'sys', '--debug' ] buildOp[(qtVer, "std", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'sys', '--debug' ]
logfile[(qtVer, "std", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "RsysPsys") logfile[(qtVer, "std", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "RsysPsys")
elif target == "ports": elif target == "ports":
buildOp[(qtVer, "ports", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP33', '-p', 'MP311' ] buildOp[(qtVer, "ports", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP33', '-p', 'MP312' ]
logfile[(qtVer, "ports", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rmp33Pmp311") logfile[(qtVer, "ports", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rmp33Pmp312")
buildOp[(qtVer, "ports", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP33', '-p', 'MP311', '--debug' ] buildOp[(qtVer, "ports", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'MP33', '-p', 'MP312', '--debug' ]
logfile[(qtVer, "ports", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rmp33Pmp311") logfile[(qtVer, "ports", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rmp33Pmp312")
elif target == "brew": elif target == "brew":
buildOp[(qtVer, "brew", "r")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HB311' ] buildOp[(qtVer, "brew", "r")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HB312' ]
logfile[(qtVer, "brew", "r")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb311") logfile[(qtVer, "brew", "r")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb312")
buildOp[(qtVer, "brew", "d")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HB311', '--debug' ] buildOp[(qtVer, "brew", "d")] = [ '-q', '%sBrew' % qtType, '-r', 'HB33', '-p', 'HB312', '--debug' ]
logfile[(qtVer, "brew", "d")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rhb33Phb311") logfile[(qtVer, "brew", "d")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rhb33Phb312")
elif target == "brewHW": elif target == "brewHW":
buildOp[(qtVer, "brewHW", "r")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HB311' ] buildOp[(qtVer, "brewHW", "r")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HB311' ]
logfile[(qtVer, "brewHW", "r")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311") logfile[(qtVer, "brewHW", "r")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311")
@ -129,10 +131,10 @@ def Get_Build_Options( targetDic, platform ):
buildOp[(qtVer, "brewAHW", "d")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HBAuto', '--debug' ] buildOp[(qtVer, "brewAHW", "d")] = [ '-q', '%sBrew' % qtType, '-r', 'sys', '-p', 'HBAuto', '--debug' ]
logfile[(qtVer, "brewAHW", "d")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "RsysPhbauto") logfile[(qtVer, "brewAHW", "d")] = "%sBrew.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "RsysPhbauto")
elif target == "pbrew": elif target == "pbrew":
buildOp[(qtVer, "pbrew", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'HB33', '-p', 'HB311' ] buildOp[(qtVer, "pbrew", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'HB33', '-p', 'HB312' ]
logfile[(qtVer, "pbrew", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb311") logfile[(qtVer, "pbrew", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "Rhb33Phb312")
buildOp[(qtVer, "pbrew", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'HB33', '-p', 'HB311', '--debug' ] buildOp[(qtVer, "pbrew", "d")] = [ '-q', '%sMacPorts' % qtType, '-r', 'HB33', '-p', 'HB312', '--debug' ]
logfile[(qtVer, "pbrew", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rhb33Phb311") logfile[(qtVer, "pbrew", "d")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "debug", "Rhb33Phb312")
elif target == "pbrewHW": elif target == "pbrewHW":
buildOp[(qtVer, "pbrewHW", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'HB311' ] buildOp[(qtVer, "pbrewHW", "r")] = [ '-q', '%sMacPorts' % qtType, '-r', 'sys', '-p', 'HB311' ]
logfile[(qtVer, "pbrewHW", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311") logfile[(qtVer, "pbrewHW", "r")] = "%sMP.build.macos-%s-%s-%s.log" % (qtType.lower(), platform, "release", "RsysPhb311")
@ -141,9 +143,9 @@ def Get_Build_Options( targetDic, platform ):
if WithPymod: if WithPymod:
buildOp[(qtVer, "ports", "r")] = buildOp[(qtVer, "ports", "r")] + ['--buildPymod'] buildOp[(qtVer, "ports", "r")] = buildOp[(qtVer, "ports", "r")] + ['--buildPymod']
buildOp[(qtVer, "brew", "r")] = buildOp[(qtVer, "brew", "r")] + ['--buildPymod'] buildOp[(qtVer, "brew", "r")] = buildOp[(qtVer, "brew", "r")]
buildOp[(qtVer, "ana3", "r")] = buildOp[(qtVer, "ana3", "r")] + ['--buildPymod'] buildOp[(qtVer, "ana3", "r")] = buildOp[(qtVer, "ana3", "r")] + ['--buildPymod']
buildOp[(qtVer, "pbrew", "r")] = buildOp[(qtVer, "pbrew", "r")] + ['--buildPymod'] buildOp[(qtVer, "pbrew", "r")] = buildOp[(qtVer, "pbrew", "r")]
buildOp[(qtVer, "ports", "d")] = buildOp[(qtVer, "ports", "d")] buildOp[(qtVer, "ports", "d")] = buildOp[(qtVer, "ports", "d")]
buildOp[(qtVer, "brew", "d")] = buildOp[(qtVer, "brew", "d")] buildOp[(qtVer, "brew", "d")] = buildOp[(qtVer, "brew", "d")]
@ -175,11 +177,11 @@ def Get_QAT_Directory( targetDic, platform ):
dirQAT[(qtVer, "std", "r")] = '%sMP.build.macos-%s-release-RsysPsys.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "std", "r")] = '%sMP.build.macos-%s-release-RsysPsys.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "std", "d")] = '%sMP.build.macos-%s-debug-RsysPsys.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "std", "d")] = '%sMP.build.macos-%s-debug-RsysPsys.macQAT' % (qtType.lower(), platform)
elif target == "ports": elif target == "ports":
dirQAT[(qtVer, "ports", "r")] = '%sMP.build.macos-%s-release-Rmp33Pmp311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "ports", "r")] = '%sMP.build.macos-%s-release-Rmp33Pmp312.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "ports", "d")] = '%sMP.build.macos-%s-debug-Rmp33Pmp311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "ports", "d")] = '%sMP.build.macos-%s-debug-Rmp33Pmp312.macQAT' % (qtType.lower(), platform)
elif target == "brew": elif target == "brew":
dirQAT[(qtVer, "brew", "r")] = '%sBrew.build.macos-%s-release-Rhb33Phb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brew", "r")] = '%sBrew.build.macos-%s-release-Rhb33Phb312.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "brew", "d")] = '%sBrew.build.macos-%s-debug-Rhb33Phb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brew", "d")] = '%sBrew.build.macos-%s-debug-Rhb33Phb312.macQAT' % (qtType.lower(), platform)
elif target == "brewHW": elif target == "brewHW":
dirQAT[(qtVer, "brewHW", "r")] = '%sBrew.build.macos-%s-release-RsysPhb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brewHW", "r")] = '%sBrew.build.macos-%s-release-RsysPhb311.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "brewHW", "d")] = '%sBrew.build.macos-%s-debug-RsysPhb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brewHW", "d")] = '%sBrew.build.macos-%s-debug-RsysPhb311.macQAT' % (qtType.lower(), platform)
@ -193,8 +195,8 @@ def Get_QAT_Directory( targetDic, platform ):
dirQAT[(qtVer, "brewAHW", "r")] = '%sBrew.build.macos-%s-release-RsysPhbauto.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brewAHW", "r")] = '%sBrew.build.macos-%s-release-RsysPhbauto.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "brewAHW", "d")] = '%sBrew.build.macos-%s-debug-RsysPhbauto.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "brewAHW", "d")] = '%sBrew.build.macos-%s-debug-RsysPhbauto.macQAT' % (qtType.lower(), platform)
elif target == "pbrew": elif target == "pbrew":
dirQAT[(qtVer, "pbrew", "r")] = '%sMP.build.macos-%s-release-Rhb33Phb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "pbrew", "r")] = '%sMP.build.macos-%s-release-Rhb33Phb312.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "pbrew", "d")] = '%sMP.build.macos-%s-debug-Rhb33Phb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "pbrew", "d")] = '%sMP.build.macos-%s-debug-Rhb33Phb312.macQAT' % (qtType.lower(), platform)
elif target == "pbrewHW": elif target == "pbrewHW":
dirQAT[(qtVer, "pbrewHW", "r")] = '%sMP.build.macos-%s-release-RsysPhb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "pbrewHW", "r")] = '%sMP.build.macos-%s-release-RsysPhb311.macQAT' % (qtType.lower(), platform)
dirQAT[(qtVer, "pbrewHW", "d")] = '%sMP.build.macos-%s-debug-RsysPhb311.macQAT' % (qtType.lower(), platform) dirQAT[(qtVer, "pbrewHW", "d")] = '%sMP.build.macos-%s-debug-RsysPhb311.macQAT' % (qtType.lower(), platform)
@ -233,14 +235,14 @@ def Get_Package_Options( targetDic, platform, srlDMG, makeflag ):
packOp[(qtVer, "std", "d")] = [ '-p', 'ST-%sMP.pkg.macos-%s-debug-RsysPsys' % (qtType.lower(), platform), packOp[(qtVer, "std", "d")] = [ '-p', 'ST-%sMP.pkg.macos-%s-debug-RsysPsys' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
elif target == "ports": elif target == "ports":
packOp[(qtVer, "ports", "r")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rmp33Pmp311' % (qtType.lower(), platform), packOp[(qtVer, "ports", "r")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rmp33Pmp312' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "ports", "d")] = [ '-p', 'LW-%sMP.pkg.macos-%s-debug-Rmp33Pmp311' % (qtType.lower(), platform), packOp[(qtVer, "ports", "d")] = [ '-p', 'LW-%sMP.pkg.macos-%s-debug-Rmp33Pmp312' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
elif target == "brew": elif target == "brew":
packOp[(qtVer, "brew", "r")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb33Phb311' % (qtType.lower(), platform), packOp[(qtVer, "brew", "r")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-release-Rhb33Phb312' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "brew", "d")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-debug-Rhb33Phb311' % (qtType.lower(), platform), packOp[(qtVer, "brew", "d")] = [ '-p', 'LW-%sBrew.pkg.macos-%s-debug-Rhb33Phb312' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
elif target == "brewHW": elif target == "brewHW":
packOp[(qtVer, "brewHW", "r")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform), packOp[(qtVer, "brewHW", "r")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform),
@ -263,9 +265,9 @@ def Get_Package_Options( targetDic, platform, srlDMG, makeflag ):
packOp[(qtVer, "brewAHW", "d")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-debug-RsysPhbauto' % (qtType.lower(), platform), packOp[(qtVer, "brewAHW", "d")] = [ '-p', 'HW-%sBrew.pkg.macos-%s-debug-RsysPhbauto' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
elif target == "pbrew": elif target == "pbrew":
packOp[(qtVer, "pbrew", "r")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rhb33Phb311' % (qtType.lower(), platform), packOp[(qtVer, "pbrew", "r")] = [ '-p', 'LW-%sMP.pkg.macos-%s-release-Rhb33Phb312' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
packOp[(qtVer, "pbrew", "d")] = [ '-p', 'LW-%sMP.pkg.macos-%s-debug-Rhb33Phb311' % (qtType.lower(), platform), packOp[(qtVer, "pbrew", "d")] = [ '-p', 'LW-%sMP.pkg.macos-%s-debug-Rhb33Phb312' % (qtType.lower(), platform),
'-s', '%d' % srlDMG, '%s' % flag ] '-s', '%d' % srlDMG, '%s' % flag ]
elif target == "pbrewHW": elif target == "pbrewHW":
packOp[(qtVer, "pbrewHW", "r")] = [ '-p', 'HW-%sMP.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform), packOp[(qtVer, "pbrewHW", "r")] = [ '-p', 'HW-%sMP.pkg.macos-%s-release-RsysPhb311' % (qtType.lower(), platform),
@ -294,8 +296,8 @@ def Parse_CommandLine_Arguments():
global DryRun # True for dry-run global DryRun # True for dry-run
platform = Test_My_Platform() platform = Test_My_Platform()
if platform in [ "Sonoma", "Ventura", "Monterey" ]: if platform in [ "Sequoia", "Sonoma", "Ventura", "Monterey" ]:
targetopt = "0,1,2,3,4" targetopt = "0,1,2,13,4"
else: else:
targetopt = "" targetopt = ""
@ -303,7 +305,7 @@ def Parse_CommandLine_Arguments():
Usage += "----------------------------------------------------------------------------------------------------------\n" Usage += "----------------------------------------------------------------------------------------------------------\n"
Usage += " nightlyBuild.py [EXPERIMENTAL]\n" Usage += " nightlyBuild.py [EXPERIMENTAL]\n"
Usage += " << To execute the jobs for making KLayout's DMGs for\n" Usage += " << To execute the jobs for making KLayout's DMGs for\n"
Usage += " macOS Monterey, Ventura, or Sonoma >>\n" Usage += " macOS Monterey, Ventura, Sonoma, or Sequoia >>\n"
Usage += "\n" Usage += "\n"
Usage += "$ [python] nightlyBuild.py\n" Usage += "$ [python] nightlyBuild.py\n"
Usage += " option & argument : comment on option if any | default value\n" Usage += " option & argument : comment on option if any | default value\n"
@ -337,7 +339,7 @@ def Parse_CommandLine_Arguments():
Usage += " (3) $ ./nightlyBuild.py --test |\n" Usage += " (3) $ ./nightlyBuild.py --test |\n"
Usage += " (4) $ ./nightlyBuild.py --check (confirm the QA Test results) |\n" Usage += " (4) $ ./nightlyBuild.py --check (confirm the QA Test results) |\n"
Usage += " (5) $ ./nightlyBuild.py --makedmg 1 |\n" Usage += " (5) $ ./nightlyBuild.py --makedmg 1 |\n"
Usage += " (6) $ ./nightlyBuild.py --upload '0.29.0' |\n" Usage += " (6) $ ./nightlyBuild.py --upload '0.29.7' |\n"
Usage += " (7) $ ./nightlyBuild.py --cleandmg 1 |\n" Usage += " (7) $ ./nightlyBuild.py --cleandmg 1 |\n"
Usage += "-----------------------------------------------------------------------------+----------------------------\n" Usage += "-----------------------------------------------------------------------------+----------------------------\n"
@ -421,9 +423,9 @@ def Parse_CommandLine_Arguments():
print(Usage) print(Usage)
quit() quit()
myPlatform = Test_My_Platform( [ 'Monterey', 'Ventura', 'Sonoma' ] ) myPlatform = Test_My_Platform( [ 'Monterey', 'Ventura', 'Sonoma', 'Sequoia' ] )
if myPlatform == "": if myPlatform == "":
print( "! Current platform is not [ 'Monterey', 'Ventura', 'Sonoma' ]" ) print( "! Current platform is not [ 'Monterey', 'Ventura', 'Sonoma', 'Sequoia' ]" )
print(Usage) print(Usage)
quit() quit()