Skip to content

Commit

Permalink
Updated the build system for macOS: Anaconda3's Ruby 3.1.4 -> 3.2.2. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazzz-S authored and Matthias Koefferlein committed Jan 7, 2024
1 parent 4e20e78 commit cf0efe1
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions macbuild/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Relevant KLayout version: 0.28.14<br>
Relevant KLayout version: 0.28.15<br>
Author: Kazzz-S<br>
Last modified: 2023-12-10<br>
Last modified: 2024-01-05<br>

# 1. Introduction
This directory **`macbuild`** contains various files required for building KLayout (http://www.klayout.de/) version 0.28.13 or later for different 64-bit macOS, including:
Expand Down Expand Up @@ -81,7 +81,7 @@ $ [python] ./build4mac.py
: Sys: use [Sonoma|Ventura|Monterey]-bundled Ruby 2.6 |
: MP32: use Ruby 3.2 from MacPorts |
: HB32: use Ruby 3.2 from Homebrew |
: Ana3: use Ruby 3.1 from Anaconda3 |
: Ana3: use Ruby 3.2 from Anaconda3 |
[-p|--python <type>] : case-insensitive type=['nil', 'MP311', 'HB311', 'Ana3', | hb311
: 'MP39', 'hb311', 'HBAuto'] |
: nil: don't bind Python |
Expand Down Expand Up @@ -215,10 +215,10 @@ $ ./build4mac.py -q qt5macports -r mp32 -p mp311 -Y
* "Rmp32Pmp311" means that Ruby is 3.2 from MacPorts; Python is 3.11 from MacPorts.
4. Copy/move the generated application bundle **`klayout.app`** to your **`/Applications`** directory for installation.

### 6E. Fully Anaconda3-flavored build with Anaconda3 Ruby 3.1 and Anaconda3 Python 3.11
0. Install Anaconda3 (Anaconda3-2023.09-0-MacOSX-x86_64.pkg), then install Ruby 3.1 and libgit2 by
### 6E. Fully Anaconda3-flavored build with Anaconda3 Ruby 3.2 and Anaconda3 Python 3.11
0. Install Anaconda3 (Anaconda3-2023.09-0-MacOSX-x86_64.pkg), then install Ruby 3.2 and libgit2 by
```
$ conda install ruby=3.1.4
$ conda install ruby=3.2.2
$ conda install -c conda-forge libgit2
```

Expand All @@ -239,7 +239,7 @@ $ ./build4mac.py -q qt5ana3 -r ana3 -p ana3 -Y
**`LW-qt5Ana3.pkg.macos-Monterey-release-Rana3Pana3`** directory, where
* "LW-" means this is a lightweight package.
* "qt5Ana3" means that Qt5 from Anaconda3 is used.
* "Rana3Pana3" means that Ruby (3.1) is from Anaconda3; Python (3.11) is from Anaconda3.
* "Rana3Pana3" means that Ruby (3.2) is from Anaconda3; Python (3.11) is from Anaconda3.
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:
```
Expand Down
Binary file modified macbuild/Resources/script-bundle-A.zip
Binary file not shown.
Binary file modified macbuild/Resources/script-bundle-B.zip
Binary file not shown.
Binary file modified macbuild/Resources/script-bundle-H.zip
Binary file not shown.
Binary file modified macbuild/Resources/script-bundle-P.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion macbuild/build4mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def GenerateUsage(platform):
usage += " : Sys: use [Sonoma|Ventura|Monterey]-bundled Ruby 2.6 |\n"
usage += " : MP32: use Ruby 3.2 from MacPorts |\n"
usage += " : HB32: use Ruby 3.2 from Homebrew |\n"
usage += " : Ana3: use Ruby 3.1 from Anaconda3 |\n"
usage += " : Ana3: use Ruby 3.2 from Anaconda3 |\n"
usage += " [-p|--python <type>] : case-insensitive type=['nil', 'MP311', 'HB311', 'Ana3', | %s\n" % myPython
usage += " : 'MP39', 'HB39', 'HBAuto'] |\n"
usage += " : nil: don't bind Python |\n"
Expand Down
6 changes: 3 additions & 3 deletions macbuild/build4mac_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@
'lib': '%s/lib/libruby.3.2.dylib' % HBRuby32Path
}

# Ruby 3.1 bundled with anaconda3 installed under /Applications/anaconda3/
# Ruby 3.2 bundled with anaconda3 installed under /Applications/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/
# [Key Type Name] = 'Ana3'
RubyAnaconda3 = { 'exe': '/Applications/anaconda3/bin/ruby',
'inc': '/Applications/anaconda3/include/ruby-3.1.0',
'lib': '/Applications/anaconda3/lib/libruby.3.1.dylib'
'inc': '/Applications/anaconda3/include/ruby-3.2.0',
'lib': '/Applications/anaconda3/lib/libruby.3.2.dylib'
}

# Consolidated dictionary kit for Ruby
Expand Down

0 comments on commit cf0efe1

Please sign in to comment.