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
|
|
|
|
|
MyHome = os.environ['HOME']
|
2017-12-16 05:58:42 +01:00
|
|
|
|
2017-12-27 11:39:24 +01:00
|
|
|
#-----------------------------------------------------
|
2017-12-29 13:00:03 +01:00
|
|
|
# [0] Xcode's tools
|
2017-12-27 11:39:24 +01:00
|
|
|
#-----------------------------------------------------
|
|
|
|
|
XcodeToolChain = { 'nameID': '/usr/bin/install_name_tool -id ',
|
|
|
|
|
'nameCH': '/usr/bin/install_name_tool -change '
|
|
|
|
|
}
|
|
|
|
|
|
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'
|
|
|
|
|
Qt5Brew = { 'qmake' : '/usr/local/opt/qt/bin/qmake',
|
|
|
|
|
'deploy': '/usr/local/opt/qt/bin/macdeployqt'
|
|
|
|
|
}
|
2018-02-06 05:49:18 +01:00
|
|
|
|
2019-12-22 12:15:53 +01:00
|
|
|
# Qt5 bundled with anaconda3 installed under $HOME/opt/anaconda3/
|
|
|
|
|
# installed by the standard installation package
|
|
|
|
|
# [Key Type Name] = 'Qt5Ana3'
|
|
|
|
|
Qt5Ana3 = { 'qmake' : '%s/opt/anaconda3/bin/qmake' % MyHome,
|
|
|
|
|
'deploy': '%s/opt/anaconda3/bin/macdeployqt' % MyHome
|
|
|
|
|
}
|
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' ]
|
|
|
|
|
RubySys = [ 'RubyElCapitan', 'RubySierra', 'RubyHighSierra', 'RubyMojave', 'RubyCatalina' ]
|
2020-03-06 23:30:41 +01:00
|
|
|
RubyExt = [ 'Ruby26MacPorts', '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.
|
|
|
|
|
# [Key Type Name] = 'Sys'
|
|
|
|
|
CatalinaSDK = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk"
|
|
|
|
|
RubyCatalina = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby',
|
|
|
|
|
'inc': '%s/System/Library/Frameworks/Ruby.framework/Headers' % CatalinaSDK,
|
|
|
|
|
'lib': '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/libruby.dylib'
|
2018-01-03 04:53:41 +01:00
|
|
|
}
|
|
|
|
|
|
2019-12-22 12:15:53 +01:00
|
|
|
# Ruby 2.6 from MacPorts (https://www.macports.org/) *+*+*+ EXPERIMENTAL *+*+*+
|
|
|
|
|
# install with 'sudo port install ruby26'
|
|
|
|
|
# [Key Type Name] = 'MP26'
|
|
|
|
|
Ruby26MacPorts = { 'exe': '/opt/local/bin/ruby2.6',
|
|
|
|
|
'inc': '/opt/local/include/ruby-2.6.0',
|
|
|
|
|
'lib': '/opt/local/lib/libruby.2.6.dylib'
|
|
|
|
|
}
|
|
|
|
|
|
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'
|
2020-05-10 21:54:40 +02:00
|
|
|
HBRuby27Path = '/usr/local/opt/ruby'
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Ruby 2.5 bundled with anaconda3 installed under $HOME/opt/anaconda3/ *+*+*+ EXPERIMENTAL *+*+*+
|
|
|
|
|
# install with 'conda install ruby'
|
|
|
|
|
# [Key Type Name] = 'Ana3'
|
|
|
|
|
RubyAnaconda3 = { 'exe': '%s/opt/anaconda3/bin/ruby' % MyHome,
|
|
|
|
|
'inc': '%s/opt/anaconda3/include/ruby-2.5.0' % MyHome,
|
|
|
|
|
'lib': '%s/opt/anaconda3/lib/libruby.2.5.1.dylib' % MyHome
|
|
|
|
|
}
|
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,
|
|
|
|
|
'Ruby26MacPorts': Ruby26MacPorts,
|
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' ]
|
|
|
|
|
PythonSys = [ 'PythonElCapitan', 'PythonSierra', 'PythonHighSierra', 'PythonMojave', 'PythonCatalina' ]
|
|
|
|
|
PythonExt = [ 'Python37MacPorts', 'Python37Brew', 'PythonAnaconda3' ]
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
2019-12-22 12:15:53 +01:00
|
|
|
# Bundled with Mojave (10.15)
|
|
|
|
|
# [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
|
|
|
}
|
|
|
|
|
|
2019-12-22 12:15:53 +01:00
|
|
|
# Python 3.7 from MacPorts (https://www.macports.org/) *+*+*+ EXPERIMENTAL *+*+*+
|
|
|
|
|
# install with 'sudo port install python37'
|
|
|
|
|
# [Key Type Name] = 'MP37'
|
|
|
|
|
Python37MacPorts= { 'exe': '/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m',
|
|
|
|
|
'inc': '/opt/local/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m',
|
|
|
|
|
'lib': '/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib'
|
2018-01-03 04:53:41 +01:00
|
|
|
}
|
|
|
|
|
|
2019-12-22 12:15:53 +01:00
|
|
|
# Python 3.7 from Homebrew *+*+*+ EXPERIMENTAL *+*+*+
|
|
|
|
|
# install with 'brew install python'
|
|
|
|
|
# [Key Type Name] = 'HB37'
|
2020-05-10 21:54:40 +02:00
|
|
|
HBPython37FrameworkPath = '/usr/local/opt/python3/Frameworks/Python.framework'
|
2019-12-22 12:15:53 +01:00
|
|
|
Python37Brew = { 'exe': '%s/Versions/3.7/bin/python3.7m' % HBPython37FrameworkPath,
|
|
|
|
|
'inc': '%s/Versions/3.7/include/python3.7m' % HBPython37FrameworkPath,
|
|
|
|
|
'lib': '%s/Versions/3.7/lib/libpython3.7m.dylib' % HBPython37FrameworkPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Python 3.7 bundled with anaconda3 installed under $HOME/opt/anaconda3/ *+*+*+ EXPERIMENTAL *+*+*+
|
|
|
|
|
# installed by the standard installation package
|
|
|
|
|
# [Key Type Name] = 'Ana3'
|
|
|
|
|
PythonAnaconda3 = { 'exe': '%s/opt/anaconda3/bin/python3.7m' % MyHome,
|
|
|
|
|
'inc': '%s/opt/anaconda3/include/python3.7m' % MyHome,
|
|
|
|
|
'lib': '%s/opt/anaconda3/lib/libpython3.7m.dylib' % MyHome
|
|
|
|
|
}
|
2018-02-06 05:49:18 +01:00
|
|
|
|
2017-12-16 06:45:14 +01:00
|
|
|
# Consolidated dictionary kit for Python
|
2017-12-16 05:58:42 +01:00
|
|
|
PythonDictionary= { 'nil' : None,
|
|
|
|
|
'PythonElCapitan' : PythonElCapitan,
|
|
|
|
|
'PythonSierra' : PythonSierra,
|
|
|
|
|
'PythonHighSierra': PythonHighSierra,
|
2019-12-22 12:15:53 +01:00
|
|
|
'PythonMojave' : PythonMojave,
|
|
|
|
|
'PythonCatalina' : PythonCatalina,
|
|
|
|
|
'Python37MacPorts': Python37MacPorts,
|
2018-10-02 22:41:08 +02:00
|
|
|
'Python37Brew' : Python37Brew,
|
2019-12-22 12:15:53 +01:00
|
|
|
'PythonAnaconda3' : PythonAnaconda3
|
2017-12-16 05:58:42 +01:00
|
|
|
}
|
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
|
|
|
|
|
#----------------
|