diff --git a/.gitignore b/.gitignore index 42c4a5cb5..29f6d0f19 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,8 @@ build-* bin-* mkqtdecl.tmp testtmp +*build.macos* +*bin.macos* # private data private @@ -54,3 +56,12 @@ src/klayout.pro.user *.egg-info/ build/ dist/ + + +# IDEs +.vscode + + +# Macos artifacts +*.dmg +*.dmg.md5 diff --git a/.travis.yml b/.travis.yml index 5917ff4cb..34ac00e1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,37 @@ branches: matrix: include: # python manylinux packages + - name: "cp39-cp39m-manylinux1_x86_64.whl" + os: linux + sudo: true + language: python + python: '3.9' + services: + - docker + env: + - DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" + - PY_VERSION="cp39-cp39" + - DOCKER_BUILD=true + - TEST_IN_HOST=true + - MATRIX_EVAL="" + cache: + directories: + - ccache + + - name: "cp39-cp39m-manylinux1_i686.whl" + os: linux + sudo: true + services: + - docker + env: + - DOCKER_IMAGE="quay.io/pypa/manylinux1_i686" + - PY_VERSION="cp39-cp39" + - DOCKER_BUILD=true + - MATRIX_EVAL="" + cache: + directories: + - ccache + - name: "cp38-cp38m-manylinux1_x86_64.whl" os: linux sudo: true diff --git a/Makefile b/Makefile index a8e1d727b..b96f80895 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ GITCOMMIT := $(shell git rev-parse --short HEAD) KLAYOUT_VERSION := $(shell source version.sh && echo $$KLAYOUT_VERSION) ifndef PYTHON_VERSION - PYTHON_VERSION := B37 + PYTHON_VERSION := HB38 endif ifndef MACOS_VERSION - MACOS_VERSION := HighSierra + MACOS_VERSION := Catalina endif .ONESHELL: @@ -15,11 +15,11 @@ default: help help: @echo "For Mac OS only" - @echo "make build PYTHON_VERSION=B37" - @echo "make deploy PYTHON_VERSION=B37" + @echo "make build PYTHON_VERSION=HB38" + @echo "make deploy PYTHON_VERSION=HB38" @echo "make test MACOS_VERSION=HighSierra" - @echo "Valid Mac OS Versions: [Yosemite, ElCapitan, Sierra, HighSierra]" - @echo "Valid Python Version: [nil, Sys, B37]" + @echo "Valid Mac OS Versions: [Yosemite, ElCapitan, Sierra, HighSierra, Mojave, Catalina]" + @echo "Valid Python Version: [nil, Sys, HB38]" build: @echo "Building for Mac $(GITCOMMIT)" @@ -29,11 +29,11 @@ build: deploy: @echo "Deploying 4 Mac $(GITCOMMIT)" ./build4mac.py -p $(PYTHON_VERSION) -q Qt5Brew -y - + test: @echo "Testing 4 Mac $(GITCOMMIT)" - qt5.pkg.macos-$(MACOS_VERSION)-release/klayout.app/Contents/MacOS/klayout -b -r test-pylib-script.py; \ - cd qt5.build.macos-$(MACOS_VERSION)-release; \ + PIP_REQUIRE_VIRTUALENV="false" HW-qt5Brew.pkg.macos-$(MACOS_VERSION)-release-RsysPhb38/klayout.app/Contents/MacOS/klayout -b -r test-pylib-script.py; \ + cd qt5Brew.build.macos-$(MACOS_VERSION)-release-RsysPhb38; \ ln -s klayout.app/Contents/MacOS/klayout klayout; \ export TESTTMP=testtmp; \ export TESTSRC=..; \ @@ -41,18 +41,24 @@ test: ./ut_runner -h || true; \ cd .. +dmg-template: + mkdir -p testtemplate/klayout.app + ./makeDMG4mac.py -p testtemplate -m -z -t klayoutDMGTemplate.dmg + cp -a klayoutDMGTemplate.dmg* macbuild/Resources/ + rm -Rf testtemplate + dropbox-deploy: @echo "Preparing for dropbox deployment $(MACOS_VERSION) $(GITCOMMIT)" - mkdir -p deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION); \ - pwd; \ - ls -lah; \ - touch build.txt; \ - cp build.txt deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION)/qt5.pkg.macos-$(MACOS_VERSION)-$(PYTHON_VERSION)-release-$(KLAYOUT_VERSION)-$(GITCOMMIT).log.txt; \ - hdiutil convert macbuild/Resources/klayoutDMGTemplate.dmg -format UDRW -o work-KLayout.dmg; \ - hdiutil resize -size 500m work-KLayout.dmg; \ - hdiutil attach work-KLayout.dmg -readwrite -noverify -quiet -mountpoint tempKLayout -noautoopen; \ - cp -a qt5.pkg.macos-$(MACOS_VERSION)-release/ tempKLayout/; \ - hdiutil detach tempKLayout; \ - hdiutil convert work-KLayout.dmg -format UDZO -imagekey zlib-level=9 -o deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION)/qt5.pkg.macos-$(MACOS_VERSION)-$(PYTHON_VERSION)-release-$(KLAYOUT_VERSION)-$(GITCOMMIT).dmg; \ - md5 -q deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION)/qt5.pkg.macos-$(MACOS_VERSION)-$(PYTHON_VERSION)-release-$(KLAYOUT_VERSION)-$(GITCOMMIT).dmg > deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION)/qt5.pkg.macos-$(MACOS_VERSION)-$(PYTHON_VERSION)-release-$(KLAYOUT_VERSION)-$(GITCOMMIT).dmg.md5; \ + mkdir -p deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION) + pwd + ls -lah + touch build.txt + cp build.txt deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION)/qt5.pkg.macos-$(MACOS_VERSION)-$(PYTHON_VERSION)-release-$(KLAYOUT_VERSION)-$(GITCOMMIT).log.txt + hdiutil convert macbuild/Resources/klayoutDMGTemplate.dmg -ov -format UDRW -o work-KLayout.dmg + hdiutil resize -size 500m work-KLayout.dmg + hdiutil attach -readwrite -noverify -quiet -mountpoint tempKLayout -noautoopen work-KLayout.dmg + cp -a HW-qt5Brew.pkg.macos-$(MACOS_VERSION)-release-RsysPhb38/ tempKLayout/ + hdiutil detach tempKLayout + hdiutil convert work-KLayout.dmg -ov -format UDZO -imagekey zlib-level=9 -o deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION)/qt5.pkg.macos-$(MACOS_VERSION)-$(PYTHON_VERSION)-release-$(KLAYOUT_VERSION)-$(GITCOMMIT).dmg + md5 -q deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION)/qt5.pkg.macos-$(MACOS_VERSION)-$(PYTHON_VERSION)-release-$(KLAYOUT_VERSION)-$(GITCOMMIT).dmg > deploy/$(MACOS_VERSION)/$(PYTHON_VERSION)/$(KLAYOUT_VERSION)/qt5.pkg.macos-$(MACOS_VERSION)-$(PYTHON_VERSION)-release-$(KLAYOUT_VERSION)-$(GITCOMMIT).dmg.md5 rm work-KLayout.dmg diff --git a/build.sh b/build.sh index 6c6150e8f..676d8aa99 100755 --- a/build.sh +++ b/build.sh @@ -532,6 +532,11 @@ if [ "$BIN" = "" ]; then BIN=$CURR_DIR/bin-$CONFIG fi +if [ "$QMAKE_CCACHE" = 1 ]; then + echo " Compilation caching is activated." +else + echo " Compilation caching is deactivated!" +fi echo " Installation target: $BIN" echo " Build directory: $BUILD" diff --git a/macbuild/.gitignore b/macbuild/.gitignore index 0d20b6487..4081080e3 100644 --- a/macbuild/.gitignore +++ b/macbuild/.gitignore @@ -1 +1,2 @@ *.pyc +KLayoutDMG.applescript diff --git a/macbuild/ReadMe.md b/macbuild/ReadMe.md index 4f87e9616..09344755b 100644 --- a/macbuild/ReadMe.md +++ b/macbuild/ReadMe.md @@ -1,4 +1,4 @@ -Relevant KLayout version: 0.26.5 +Relevant KLayout version: 0.26.7 # 1. Introduction This directory **`macbuild`** contains different files required for building KLayout (http://www.klayout.de/) version 0.26.1 or later for different 64-bit Mac OSXs including: @@ -72,16 +72,16 @@ $ [python] ./build4mac.py : MP26: use Ruby 2.6 from MacPorts | : HB27: use Ruby 2.7 from Homebrew | : Ana3: use Ruby 2.5 from Anaconda3 | - [-p|--python ] : case-insensitive type=['nil', 'Sys', 'MP37', 'HB37', 'Ana3'] | sys + [-p|--python ] : case-insensitive type=['nil', 'Sys', 'MP38', 'HB38', 'Ana3'] | sys : nil: don't bind Python | : Sys: use OS-bundled Python 2.7 [ElCapitan -- Catalina] | - : MP37: use Python 3.7 from MacPorts | - : HB37: use Python 3.7 from Homebrew | - : Ana3: use Python 3.7 from Anaconda3 | + : MP38: use Python 3.8 from MacPorts | + : HB38: use Python 3.8 from Homebrew | + : Ana3: use Python 3.8 from Anaconda3 | [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled [-m|--make