2018-03-15 06:32:44 +01:00
|
|
|
#! /usr/bin/env python
|
2017-12-16 05:58:42 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
#===============================================================================
|
|
|
|
|
# File: "macbuild/build4mac_env.py"
|
|
|
|
|
#
|
2017-12-16 10:55:10 +01:00
|
|
|
# Here are dictionaries of ...
|
|
|
|
|
# different modules for building KLayout (http://www.klayout.de/index.php)
|
2019-12-22 12:15:53 +01:00
|
|
|
# version 0.26.1 or later on different Apple Mac OSX platforms.
|
2017-12-16 05:58:42 +01:00
|
|
|
#
|
2017-12-16 06:45:14 +01:00
|
|
|
# This file is imported by 'build4mac.py' script.
|
2017-12-16 05:58:42 +01:00
|
|
|
#===============================================================================
|
2019-12-22 12:15:53 +01:00
|
|
|
import os
|
2020-11-26 23:00:12 +01:00
|
|
|
import glob
|
2021-04-29 14:25:17 +02:00
|
|
|
import platform
|
2017-12-16 05:58:42 +01:00
|
|
|
|
2021-04-29 14:25:17 +02:00
|
|
|
#---------------------------------------------------------------------------------------------------
|
2017-12-29 13:00:03 +01:00
|
|
|
# [0] Xcode's tools
|
2021-04-29 14:25:17 +02:00
|
|
|
# and
|
|
|
|
|
# Default Homebrew root
|
|
|
|
|
# Ref. https://github.com/Homebrew/brew/blob/master/docs/Installation.md#alternative-installs
|
|
|
|
|
#---------------------------------------------------------------------------------------------------
|
2017-12-27 11:39:24 +01:00
|
|
|
XcodeToolChain = { 'nameID': '/usr/bin/install_name_tool -id ',
|
|
|
|
|
'nameCH': '/usr/bin/install_name_tool -change '
|
|
|
|
|
}
|
|
|
|
|
|
2021-04-29 14:25:17 +02:00
|
|
|
(System, Node, Release, MacVersion, Machine, Processor) = platform.uname()
|
|
|
|
|
if Machine == "arm64": # Apple Silicon!
|
|
|
|
|
DefaultHomebrewRoot = '/opt/homebrew'
|
|
|
|
|
else:
|
|
|
|
|
DefaultHomebrewRoot = '/usr/local'
|
|
|
|
|
del System, Node, Release, MacVersion, Machine, Processor
|
|
|
|
|
|
2017-12-16 05:58:42 +01:00
|
|
|
#-----------------------------------------------------
|
|
|
|
|
# [1] Qt
|
|
|
|
|
#-----------------------------------------------------
|
2019-12-22 12:15:53 +01:00
|
|
|
Qts = [ 'Qt5MacPorts', 'Qt5Brew', 'Qt5Ana3' ]
|
2017-12-16 05:58:42 +01:00
|
|
|
|
|
|
|
|
#-----------------------------------------------------
|
|
|
|
|
# Whereabout of different components of Qt5
|
|
|
|
|
#-----------------------------------------------------
|
|
|
|
|
# Qt5 from MacPorts (https://www.macports.org/)
|
2019-12-22 12:15:53 +01:00
|
|
|
# install with 'sudo port install qt5'
|
2018-01-03 04:53:41 +01:00
|
|
|
# [Key Type Name] = 'Qt5MacPorts'
|
2017-12-27 11:39:24 +01:00
|
|
|
Qt5MacPorts = { 'qmake' : '/opt/local/libexec/qt5/bin/qmake',
|
|
|
|
|
'deploy': '/opt/local/libexec/qt5/bin/macdeployqt'
|
2017-12-16 05:58:42 +01:00
|
|
|
}
|
|
|
|
|
|
2018-03-13 09:01:36 +01:00
|
|
|
# Qt5 from Homebrew (https://brew.sh/)
|
2019-12-22 12:15:53 +01:00
|
|
|
# install with 'brew install qt'
|
2018-03-13 09:01:36 +01:00
|
|
|
# [Key Type Name] = 'Qt5Brew'
|
2021-05-08 02:05:26 +02:00
|
|
|
Qt5Brew = { 'qmake' : '%s/opt/qt@5/bin/qmake' % DefaultHomebrewRoot,
|
|
|
|
|
'deploy': '%s/opt/qt@5/bin/macdeployqt' % DefaultHomebrewRoot
|
2018-03-13 09:01:36 +01:00
|
|
|
}
|
2018-02-06 05:49:18 +01:00
|
|
|
|
2020-05-16 07:53:39 +02:00
|
|
|
# Qt5 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/
|
2019-12-22 12:15:53 +01:00
|
|
|
# [Key Type Name] = 'Qt5Ana3'
|
2020-05-16 07:53:39 +02:00
|
|
|
Qt5Ana3 = { 'qmake' : '/Applications/anaconda3/bin/qmake',
|
|
|
|
|
'deploy': '/Applications/anaconda3/bin/macdeployqt'
|
2019-12-22 12:15:53 +01:00
|
|
|
}
|
2018-02-07 16:51:38 +01:00
|
|
|
|
2017-12-16 05:58:42 +01:00
|
|
|
#-----------------------------------------------------
|
|
|
|
|
# [2] Ruby
|
|
|
|
|
#-----------------------------------------------------
|
2019-12-22 12:15:53 +01:00
|
|
|
RubyNil = [ 'nil' ]
|
2020-11-26 23:00:12 +01:00
|
|
|
RubySys = [ 'RubyElCapitan', 'RubySierra', 'RubyHighSierra', 'RubyMojave', 'RubyCatalina', 'RubyBigSur' ]
|
|
|
|
|
RubyExt = [ 'Ruby27MacPorts', 'Ruby27Brew', 'RubyAnaconda3' ]
|
2019-12-22 12:15:53 +01:00
|
|
|
Rubies = RubyNil + RubySys + RubyExt
|
2017-12-16 05:58:42 +01:00
|
|
|
|
|
|
|
|
#-----------------------------------------------------
|
|
|
|
|
# Whereabout of different components of Ruby
|
|
|
|
|
#-----------------------------------------------------
|
|
|
|
|
# Bundled with Yosemite (10.10)
|
2019-12-22 12:15:53 +01:00
|
|
|
# !!! Yosemite is no longer supported (KLayout 0.26 ~) but remains here to keep the record of
|
|
|
|
|
# the directory structure of earlier generations.
|
2018-01-03 04:53:41 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
2019-12-22 12:15:53 +01:00
|
|
|
RubyYosemite = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby',
|
2017-12-16 05:58:42 +01:00
|
|
|
'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Bundled with El Capitan (10.11)
|
2018-01-03 04:53:41 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
2019-12-22 12:15:53 +01:00
|
|
|
RubyElCapitan = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby',
|
2017-12-16 05:58:42 +01:00
|
|
|
'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Bundled with Sierra (10.12)
|
2018-01-03 04:53:41 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
2019-12-22 12:15:53 +01:00
|
|
|
RubySierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby',
|
2017-12-16 05:58:42 +01:00
|
|
|
'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
|
2019-12-22 12:15:53 +01:00
|
|
|
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib'
|
2017-12-16 05:58:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Bundled with High Sierra (10.13)
|
2018-01-03 04:53:41 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
2019-12-22 12:15:53 +01:00
|
|
|
RubyHighSierra = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby',
|
2017-12-16 05:58:42 +01:00
|
|
|
'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib'
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-22 12:15:53 +01:00
|
|
|
# Bundled with Mojave (10.14)
|
2020-01-01 05:09:13 +01:00
|
|
|
# The missing Ruby header files under "/System/Library/Frameworks/Ruby.framework/" were manually deployed there
|
|
|
|
|
# from "Xcode-10.1-beta2" with the corresponding Ruby version.
|
2019-12-22 12:15:53 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
|
|
|
|
RubyMojave = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby',
|
2020-01-01 05:09:13 +01:00
|
|
|
'inc': '/System/Library/Frameworks/Ruby.framework/Headers',
|
2019-12-22 12:15:53 +01:00
|
|
|
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib'
|
2017-12-16 05:58:42 +01:00
|
|
|
}
|
|
|
|
|
|
2019-12-22 12:15:53 +01:00
|
|
|
# Bundled with Catalina (10.15)
|
|
|
|
|
# !!! Catalina does not allow to hack the "/System" directory; it's READ ONLY even for the super user!
|
|
|
|
|
# Hence, we need to refer to the Ruby header file in "Xcode.app" directly.
|
2020-11-26 23:00:12 +01:00
|
|
|
#
|
|
|
|
|
# With the major release of "macOS Big Sur (11.0)" in November 2020, Xcode has been updated, too.
|
|
|
|
|
# (base) MacBookPro2{kazzz-s}(1)$ pwd
|
|
|
|
|
# /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0
|
|
|
|
|
#
|
|
|
|
|
# (base) MacBookPro2{kazzz-s}(2)$ ll
|
|
|
|
|
# total 4
|
|
|
|
|
# drwxr-xr-x 6 root wheel 192 11 15 20:57 .
|
|
|
|
|
# drwxr-xr-x 3 root wheel 96 10 20 05:33 ..
|
|
|
|
|
# drwxr-xr-x 23 root wheel 736 10 24 11:57 ruby
|
|
|
|
|
# -rw-r--r-- 1 root wheel 868 10 19 19:32 ruby.h
|
|
|
|
|
# lrwxr-xr-x 1 root wheel 19 11 15 20:57 universal-darwin19 -> universal-darwin20/ <=== manually created this symbolic link
|
|
|
|
|
# drwxr-xr-x 6 root wheel 192 10 20 05:33 universal-darwin20
|
2019-12-22 12:15:53 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
2020-11-26 23:00:12 +01:00
|
|
|
CatalinaSDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
|
|
|
|
|
RubyCatalina = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
|
|
|
|
|
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % CatalinaSDK,
|
2020-11-21 22:07:11 +01:00
|
|
|
'inc2': '%s/System/Library/Frameworks/Ruby.framework/Headers/ruby' % CatalinaSDK,
|
2021-01-27 12:43:48 +01:00
|
|
|
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % CatalinaSDK
|
2020-11-26 23:00:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Bundled with Big Sur (11.0)
|
|
|
|
|
# Refer to the "Catalina" section above
|
|
|
|
|
# [Key Type Name] = 'Sys'
|
|
|
|
|
BigSurSDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
|
|
|
|
|
RubyBigSur = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
|
|
|
|
|
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % BigSurSDK,
|
|
|
|
|
'inc2': '%s/System/Library/Frameworks/Ruby.framework/Headers/ruby' % BigSurSDK,
|
2021-01-27 12:43:48 +01:00
|
|
|
'lib': '%s/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.tbd' % BigSurSDK
|
2018-01-03 04:53:41 +01:00
|
|
|
}
|
|
|
|
|
|
2020-11-26 23:00:12 +01:00
|
|
|
# Ruby 2.7 from MacPorts (https://www.macports.org/) *+*+*+ EXPERIMENTAL *+*+*+
|
|
|
|
|
# install with 'sudo port install ruby27'
|
|
|
|
|
# [Key Type Name] = 'MP27'
|
|
|
|
|
Ruby27MacPorts = { 'exe': '/opt/local/bin/ruby2.7',
|
|
|
|
|
'inc': '/opt/local/include/ruby-2.7.0',
|
|
|
|
|
'lib': '/opt/local/lib/libruby.2.7.dylib'
|
2019-12-22 12:15:53 +01:00
|
|
|
}
|
|
|
|
|
|
2020-03-06 23:30:41 +01:00
|
|
|
# Ruby 2.7 from Homebrew *+*+*+ EXPERIMENTAL *+*+*+
|
2019-12-22 12:15:53 +01:00
|
|
|
# install with 'brew install ruby'
|
2020-03-06 23:30:41 +01:00
|
|
|
# [Key Type Name] = 'HB27'
|
2021-05-08 02:05:26 +02:00
|
|
|
HBRuby27Path = '%s/opt/ruby@2.7' % DefaultHomebrewRoot
|
2020-03-06 23:30:41 +01:00
|
|
|
Ruby27Brew = { 'exe': '%s/bin/ruby' % HBRuby27Path,
|
|
|
|
|
'inc': '%s/include/ruby-2.7.0' % HBRuby27Path,
|
|
|
|
|
'lib': '%s/lib/libruby.2.7.dylib' % HBRuby27Path
|
2019-12-22 12:15:53 +01:00
|
|
|
}
|
|
|
|
|
|
2020-05-16 07:53:39 +02:00
|
|
|
# Ruby 2.5 bundled with anaconda3 installed under /Applications/anaconda3/ *+*+*+ EXPERIMENTAL *+*+*+
|
|
|
|
|
# The standard installation deploys the tool under $HOME/opt/anaconda3/.
|
|
|
|
|
# If so, you need to make a symbolic link: /Applications/anaconda3 ---> $HOME/opt/anaconda3/
|
2019-12-22 12:15:53 +01:00
|
|
|
# [Key Type Name] = 'Ana3'
|
2020-05-16 07:53:39 +02:00
|
|
|
RubyAnaconda3 = { 'exe': '/Applications/anaconda3/bin/ruby',
|
|
|
|
|
'inc': '/Applications/anaconda3/include/ruby-2.5.0',
|
|
|
|
|
'lib': '/Applications/anaconda3/lib/libruby.2.5.1.dylib'
|
2019-12-22 12:15:53 +01:00
|
|
|
}
|
2018-02-06 05:49:18 +01:00
|
|
|
|
2017-12-16 06:45:14 +01:00
|
|
|
# Consolidated dictionary kit for Ruby
|
2017-12-16 05:58:42 +01:00
|
|
|
RubyDictionary = { 'nil' : None,
|
|
|
|
|
'RubyYosemite' : RubyYosemite,
|
|
|
|
|
'RubyElCapitan' : RubyElCapitan,
|
|
|
|
|
'RubySierra' : RubySierra,
|
|
|
|
|
'RubyHighSierra': RubyHighSierra,
|
2019-12-22 12:15:53 +01:00
|
|
|
'RubyMojave' : RubyMojave,
|
|
|
|
|
'RubyCatalina' : RubyCatalina,
|
2020-11-26 23:00:12 +01:00
|
|
|
'RubyBigSur' : RubyBigSur,
|
|
|
|
|
'Ruby27MacPorts': Ruby27MacPorts,
|
2020-03-06 23:30:41 +01:00
|
|
|
'Ruby27Brew' : Ruby27Brew,
|
2019-12-22 12:15:53 +01:00
|
|
|
'RubyAnaconda3' : RubyAnaconda3
|
2017-12-16 05:58:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#-----------------------------------------------------
|
|
|
|
|
# [3] Python
|
|
|
|
|
#-----------------------------------------------------
|
2019-12-22 12:15:53 +01:00
|
|
|
PythonNil = [ 'nil' ]
|
2020-11-26 23:00:12 +01:00
|
|
|
PythonSys = [ 'PythonElCapitan', 'PythonSierra', 'PythonHighSierra', 'PythonMojave', 'PythonCatalina', 'PythonBigSur' ]
|
|
|
|
|
PythonExt = [ 'Python38MacPorts', 'Python38Brew', 'PythonAnaconda3', 'PythonAutoBrew' ]
|
2019-12-22 12:15:53 +01:00
|
|
|
Pythons = PythonNil + PythonSys + PythonExt
|
2017-12-16 05:58:42 +01:00
|
|
|
|
|
|
|
|
#-----------------------------------------------------
|
|
|
|
|
# Whereabout of different components of Python
|
|
|
|
|
#-----------------------------------------------------
|
|
|
|
|
# Bundled with Yosemite (10.10)
|
2019-12-22 12:15:53 +01:00
|
|
|
# !!! Yosemite is no longer supported but remains here to keep the record of the directory structure
|
|
|
|
|
# of earlier generations.
|
2018-01-03 04:53:41 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
2019-12-22 12:15:53 +01:00
|
|
|
PythonYosemite = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python',
|
2017-12-16 05:58:42 +01:00
|
|
|
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Bundled with El Capitan (10.11)
|
2018-01-03 04:53:41 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
2019-12-22 12:15:53 +01:00
|
|
|
PythonElCapitan = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python',
|
2017-12-16 05:58:42 +01:00
|
|
|
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Bundled with Sierra (10.12)
|
2018-01-03 04:53:41 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
2019-12-22 12:15:53 +01:00
|
|
|
PythonSierra = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python',
|
2017-12-16 05:58:42 +01:00
|
|
|
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Bundled with High Sierra (10.13)
|
2018-01-03 04:53:41 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
2019-12-22 12:15:53 +01:00
|
|
|
PythonHighSierra= { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python',
|
2017-12-16 05:58:42 +01:00
|
|
|
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-22 12:15:53 +01:00
|
|
|
# Bundled with Mojave (10.14)
|
|
|
|
|
# [Key Type Name] = 'Sys'
|
|
|
|
|
PythonMojave = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python',
|
|
|
|
|
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
|
2017-12-16 05:58:42 +01:00
|
|
|
}
|
|
|
|
|
|
2020-11-26 23:00:12 +01:00
|
|
|
# Bundled with Catalina (10.15)
|
2019-12-22 12:15:53 +01:00
|
|
|
# [Key Type Name] = 'Sys'
|
|
|
|
|
PythonCatalina = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python',
|
|
|
|
|
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
|
2017-12-16 05:58:42 +01:00
|
|
|
}
|
|
|
|
|
|
2020-11-26 23:00:12 +01:00
|
|
|
# Bundled with Big Sur (11.0)
|
|
|
|
|
# [Key Type Name] = 'Sys'
|
|
|
|
|
PythonBigSur = { 'exe': '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python',
|
|
|
|
|
'inc': '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
|
|
|
|
|
'lib': '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-10 00:09:34 +02:00
|
|
|
# Python 3.8 from MacPorts (https://www.macports.org/) *+*+*+ EXPERIMENTAL *+*+*+
|
|
|
|
|
# install with 'sudo port install python38'
|
|
|
|
|
# [Key Type Name] = 'MP38'
|
|
|
|
|
Python38MacPorts= { 'exe': '/opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8',
|
|
|
|
|
'inc': '/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8',
|
|
|
|
|
'lib': '/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/libpython3.8.dylib'
|
2018-01-03 04:53:41 +01:00
|
|
|
}
|
|
|
|
|
|
2020-10-10 00:09:34 +02:00
|
|
|
# Python 3.8 from Homebrew *+*+*+ EXPERIMENTAL *+*+*+
|
2019-12-22 12:15:53 +01:00
|
|
|
# install with 'brew install python'
|
2020-10-10 00:09:34 +02:00
|
|
|
# [Key Type Name] = 'HB38'
|
2021-04-29 14:25:17 +02:00
|
|
|
HBPython38FrameworkPath = '%s/opt/python@3.8/Frameworks/Python.framework' % DefaultHomebrewRoot
|
2020-10-10 00:09:34 +02:00
|
|
|
Python38Brew = { 'exe': '%s/Versions/3.8/bin/python3.8' % HBPython38FrameworkPath,
|
|
|
|
|
'inc': '%s/Versions/3.8/include/python3.8' % HBPython38FrameworkPath,
|
|
|
|
|
'lib': '%s/Versions/3.8/lib/libpython3.8.dylib' % HBPython38FrameworkPath
|
2019-12-22 12:15:53 +01:00
|
|
|
}
|
|
|
|
|
|
2020-10-10 00:09:34 +02:00
|
|
|
# Python 3.8 bundled with anaconda3 installed under /Applications/anaconda3/ *+*+*+ EXPERIMENTAL *+*+*+
|
2020-05-16 07:53:39 +02:00
|
|
|
# The standard installation deploys the tool under $HOME/opt/anaconda3/.
|
|
|
|
|
# If so, you need to make a symbolic link: /Applications/anaconda3 ---> $HOME/opt/anaconda3/
|
2019-12-22 12:15:53 +01:00
|
|
|
# [Key Type Name] = 'Ana3'
|
2020-10-10 00:09:34 +02:00
|
|
|
PythonAnaconda3 = { 'exe': '/Applications/anaconda3/bin/python3.8',
|
|
|
|
|
'inc': '/Applications/anaconda3/include/python3.8',
|
|
|
|
|
'lib': '/Applications/anaconda3/lib/libpython3.8.dylib'
|
2019-12-22 12:15:53 +01:00
|
|
|
}
|
2018-02-06 05:49:18 +01:00
|
|
|
|
2020-11-26 23:00:12 +01:00
|
|
|
# Latest Python from Homebrew *+*+*+ EXPERIMENTAL *+*+*+
|
|
|
|
|
# install with 'brew install python'
|
|
|
|
|
# There can be multiple candidates such as: (python, python3, python@3, python@3.8, python@3.9)
|
|
|
|
|
# Hard to tell which is going to be available to the user. Picking the last one.
|
|
|
|
|
# [Key Type Name] = 'HBAuto'
|
|
|
|
|
HBPythonAutoFrameworkPath = ""
|
|
|
|
|
HBPythonAutoVersion = ""
|
|
|
|
|
try:
|
2021-04-29 14:25:17 +02:00
|
|
|
HBPythonAutoFrameworkPath = glob.glob( "%s/opt/python*/Frameworks/Python.framework" % DefaultHomebrewRoot )[-1]
|
2020-11-26 23:00:12 +01:00
|
|
|
# expand 3* into HBPythonAutoVersion, there should be only one, but I am taking no chances.
|
|
|
|
|
HBAutoFrameworkVersionPath, HBPythonAutoVersion = os.path.split( glob.glob( "%s/Versions/3*" % HBPythonAutoFrameworkPath )[0] )
|
|
|
|
|
PythonAutoBrew = { 'exe': '%s/%s/bin/python%s' % ( HBAutoFrameworkVersionPath, HBPythonAutoVersion, HBPythonAutoVersion ),
|
|
|
|
|
'inc': '%s/%s/include/python%s' % ( HBAutoFrameworkVersionPath, HBPythonAutoVersion, HBPythonAutoVersion ),
|
|
|
|
|
'lib': glob.glob( "%s/%s/lib/*.dylib" % ( HBAutoFrameworkVersionPath, HBPythonAutoVersion ) )[0]
|
|
|
|
|
}
|
|
|
|
|
except Exception as e:
|
|
|
|
|
_have_Homebrew_Python = False
|
|
|
|
|
print( " WARNING!!! Since you don't have the Homebrew Python Frameworks, you cannot use the '-p HBAuto' option. " )
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|
_have_Homebrew_Python = True
|
|
|
|
|
|
2017-12-16 06:45:14 +01:00
|
|
|
# Consolidated dictionary kit for Python
|
2020-11-26 23:00:12 +01:00
|
|
|
PythonDictionary = { 'nil' : None,
|
|
|
|
|
'PythonElCapitan' : PythonElCapitan,
|
|
|
|
|
'PythonSierra' : PythonSierra,
|
|
|
|
|
'PythonHighSierra': PythonHighSierra,
|
|
|
|
|
'PythonMojave' : PythonMojave,
|
|
|
|
|
'PythonCatalina' : PythonCatalina,
|
|
|
|
|
'PythonBigSur' : PythonBigSur,
|
|
|
|
|
'Python38MacPorts': Python38MacPorts,
|
|
|
|
|
'Python38Brew' : Python38Brew,
|
|
|
|
|
'PythonAnaconda3' : PythonAnaconda3
|
|
|
|
|
}
|
|
|
|
|
if _have_Homebrew_Python:
|
|
|
|
|
PythonDictionary['PythonAutoBrew'] = PythonAutoBrew
|
2017-12-27 11:39:24 +01:00
|
|
|
|
|
|
|
|
#-----------------------------------------------------
|
2018-01-08 08:57:56 +01:00
|
|
|
# [4] KLayout executables including buddy tools
|
2017-12-27 11:39:24 +01:00
|
|
|
#-----------------------------------------------------
|
2019-12-22 12:15:53 +01:00
|
|
|
KLayoutExecs = [ 'klayout' ]
|
|
|
|
|
KLayoutExecs += [ 'strm2cif', 'strm2dxf', 'strm2gds', 'strm2gdstxt', 'strm2oas' ]
|
|
|
|
|
KLayoutExecs += [ 'strm2txt', 'strmclip', 'strmcmp', 'strmrun', 'strmxor' ]
|
2017-12-27 11:39:24 +01:00
|
|
|
|
2017-12-16 05:58:42 +01:00
|
|
|
#----------------
|
|
|
|
|
# End of File
|
|
|
|
|
#----------------
|