=====<<< Pymod for Homebrew >>>=====================================================================
==
== The following lines capture the steps I followed to install
== 'pymod' to 'Homebrew' on macOS Monterey using 'pip3'.
==
== A "KLayout Python Module" is available under '/Applications/klayout.app/Contents/pymod-dist'
== as 'klayout-*.whl' for the 'pip3' tool.
==
== Ref: https://github.com/KLayout/klayout/issues/1040
==
== File: pymod-pip3-hb311.txt
== Author: kazzz-S
== Last modified: 2023-10-27 (as of KLayout version 0.28.12)
====================================================================================================

####################
### Installation ###
####################

MacBookPro2{kazzz-s}(1)$ pwd
/Applications/klayout.app/Contents/pymod-dist

MacBookPro2{kazzz-s}(2)$ ll
:
drwxr-xr-x 3 kazzz-s admin       96 10 26 21:38 .
drwxr-xr-x 9 kazzz-s admin      288 10 26 21:38 ..
-rwxr-xr-x 1 kazzz-s admin 17203968 10 26 21:38 klayout-0.28.12-cp311-cp311-macosx_12_0_x86_64.whl

MacBookPro2{kazzz-s}(3)$ which python3
/usr/local/opt/python@3.11/bin/python3

MacBookPro2{kazzz-s}(4)$ which pip3
/usr/local/opt/python@3.11/bin/pip3

MacBookPro2{kazzz-s}(5)$ pwd
/usr/local

MacBookPro2{kazzz-s}(6)$ sudo mkdir klayout
MacBookPro2{kazzz-s}(7)$ sudo chown {kazzz-s}:admin klayout
MacBookPro2{kazzz-s}(8)$ sudo chmod 775 klayout

MacBookPro2{kazzz-s}(9)$ pip3 install klayout-0.28.12-cp311-cp311-macosx_12_0_x86_64.whl
:
Processing ./klayout-0.28.12-cp311-cp311-macosx_12_0_x86_64.whl
Installing collected packages: klayout
Successfully installed klayout-0.28.12

MacBookPro2{kazzz-s}(10)$ pip3 list | grep klayout
klayout    0.28.12

MacBookPro2{kazzz-s}(11)$ pwd
/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages

MacBookPro2{kazzz-s}(12)$ ll -rt
:
:
drwxr-xr-x  35 kazzz-s admin   1120 10 27 06:56 klayout
drwxr-xr-x   4 kazzz-s admin    128 10 27 06:56 pya
drwxr-xr-x  10 kazzz-s admin    320 10 27 06:56 klayout-0.28.12.dist-info

MacBookPro2{kazzz-s} (13)% python3
Python 3.11.6 (main, Oct  2 2023, 20:14:46) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pya
>>> pya.__version__
'0.28.12'
>>> help(pya)

Help on package pya:

NAME
    pya - KLayout core module 'lay'

PACKAGE CONTENTS


VERSION
    0.28.12

FILE
    /usr/local/lib/python3.11/site-packages/pya/__init__.py
================================================================================

####################
###   Testing    ###
####################
Visit "https://www.klayout.org/klayout-pypi/" and save the Code in the name of "sample.py".

MacBookPro2{kazzz-s}(1)$ ll
:
drwxr-xr-x   10 kazzz-s staff       320 10 27 06:42  .
drwxr-xr-x+ 116 kazzz-s staff      3712 10 27 06:59  ..
-rw-r--r--    1 kazzz-s staff      1081 10 24 22:21  sample.py

MacBookPro2{kazzz-s}(2)$ python3 sample.py
MacBookPro2{kazzz-s}(3)$ ll -rt
:
drwxr-xr-x   10 kazzz-s staff       320 10 27 06:42  .
drwxr-xr-x+ 116 kazzz-s staff      3712 10 27 06:59  ..
-rw-r--r--    1 kazzz-s staff      1081 10 24 22:21  sample.py
-rw-r--r--    1 kazzz-s staff      6316 10 27 07:00  basic.gds <=== generated

[EOF]
