diff --git a/.travis.yml b/.travis.yml index 42f0d13f6..691fa5f30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,16 @@ matrix: - PIP_UPDATE="1" - PYTHON_BUILD=true - BREW_BUNDLE=true + + - name: "klayout python3.6.5_1 osx10.13" + os: osx + osx_image: xcode9.4 # macOS 10.13 + env: + - MATRIX_EVAL="brew update; brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb; brew switch python 3.6.5_1; shopt -s expand_aliases; alias python='python3'; alias pip='pip3';" + - ARCHFLAGS="-std=c++11" + - PIP_UPDATE="1" + - PYTHON_BUILD=true + - BREW_BUNDLE=false - name: "klayout python3 osx10.12" os: osx @@ -58,11 +68,11 @@ matrix: os: osx osx_image: xcode8 # macOS 10.11 env: - - MATRIX_EVAL="shopt -s expand_aliases; alias python='python3'; alias pip='pip3';" + - MATRIX_EVAL="brew update; brew config; brew upgrade python;" - ARCHFLAGS="-std=c++11" - PIP_UPDATE="1" - PYTHON_BUILD=true - - BREW_BUNDLE=true + - BREW_BUNDLE=false - name: "klayout python3.6 package" os: linux diff --git a/Makefile b/Makefile index 1654c3d96..a8e1d727b 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,12 @@ GITCOMMIT := $(shell git rev-parse --short HEAD) KLAYOUT_VERSION := $(shell source version.sh && echo $$KLAYOUT_VERSION) +ifndef PYTHON_VERSION + PYTHON_VERSION := B37 +endif +ifndef MACOS_VERSION + MACOS_VERSION := HighSierra +endif .ONESHELL: @@ -31,6 +37,7 @@ test: ln -s klayout.app/Contents/MacOS/klayout klayout; \ export TESTTMP=testtmp; \ export TESTSRC=..; \ + export DYLD_LIBRARY_PATH=.:db_plugins/:lay_plugins/; \ ./ut_runner -h || true; \ cd .. diff --git a/macbuild/ReadMe.md b/macbuild/ReadMe.md index f03e3ca97..9ea112376 100644 --- a/macbuild/ReadMe.md +++ b/macbuild/ReadMe.md @@ -31,7 +31,7 @@ Also by default, supported script languages, i.e, Ruby and Python, are those sta You may want to use a non-OS-standard script language such as Python 3.6 from Anaconda2 (https://www.anaconda.com/download/#macos) in combination with KLayout. Since Anaconda2 is a popular Python development environment, this is worth trying. Unfortunately, however, some dynamic linkage problems are observed as of today. -On the other hand, Python 3.6 provided by MacPorts or Homebrew is usable. +On the other hand, Python 3.7 provided by MacPorts or Homebrew is usable. Please try this (refer to 3B below or Section #5) if you feel it's useful. # 3. Use-cases @@ -90,20 +90,20 @@ $ ./makeDMG4mac.py -p qt5.pkg.macos-HighSierra-release -m # 5. Alternative building options -### 5.1 Python 3.6 from Homebrew, Qt 5.10.1 from Homebrew +### 5.1 Python 3.7 from Homebrew, Qt 5.10.1 from Homebrew Homebrew's installation of python3 (`brew install python3`) places a `Python.framework` in `/usr/local/opt/python/Frameworks/Python.framework/`, which you can use to build KLayout from. Qt can also be downloaded from brew with `brew install qt`. ``` # Build step -./build4mac.py -p B36 -q Qt5Brew +./build4mac.py -p B37 -q Qt5Brew # build with log -./build4mac.py -p B36 -q Qt5Brew 2>&1 | tee qt5.build.macos-HighSierra-release-version.log +./build4mac.py -p B37 -q Qt5Brew 2>&1 | tee qt5.build.macos-HighSierra-release-version.log # Deploy step -./build4mac.py -p B36 -q Qt5Brew -y # normal deploy -./build4mac.py -p B36 -q Qt5Brew -y -v 3 2>&1 | tee qt5.pkg.macos-HighSierra-release.log # deploy with debug options +./build4mac.py -p B37 -q Qt5Brew -y # normal deploy +./build4mac.py -p B37 -q Qt5Brew -y -v 3 2>&1 | tee qt5.pkg.macos-HighSierra-release.log # deploy with debug options # Packaging step ./makeDMG4mac.py -p qt5.pkg.macos-HighSierra-release -m -q Qt5101 diff --git a/macbuild/Resources/klayoutDMGTemplate.dmg b/macbuild/Resources/klayoutDMGTemplate.dmg new file mode 100644 index 000000000..8ad28f4ad Binary files /dev/null and b/macbuild/Resources/klayoutDMGTemplate.dmg differ diff --git a/macbuild/build4mac.py b/macbuild/build4mac.py index 907226d2e..6f41c7ef9 100755 --- a/macbuild/build4mac.py +++ b/macbuild/build4mac.py @@ -67,7 +67,7 @@ def SetGlobals(): Usage += " : Refer to 'macbuild/build4mac_env.py' for details | \n" Usage += " [-q|--qt ] : type=['Qt4MacPorts', 'Qt5MacPorts', 'Qt5Brew'] | qt5macports \n" Usage += " [-r|--ruby ] : type=['nil', 'Sys', 'Src24', 'MP24', 'B25'] | sys \n" - Usage += " [-p|--python ] : type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36', 'B36'] | sys \n" + Usage += " [-p|--python ] : type=['nil', 'Sys', 'Ana27', 'Ana36', 'MP36', 'B37'] | sys \n" Usage += " [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled \n" Usage += " [-m|--make