Merge branch 'pymod-test' of https://github.com/lightwave-lab/klayout into lightwave-lab-pymod-test

This commit is contained in:
Matthias Koefferlein 2018-09-30 23:19:37 +02:00
commit 51d0cd52cf
7 changed files with 224 additions and 35 deletions

View File

@ -1,44 +1,71 @@
matrix:
include:
# python 3 osx
- os: osx
# python 2 osx
- name: "klayout python2 osx10.13"
os: osx
osx_image: xcode9.4 # macOS 10.13
env:
- MATRIX_EVAL=""
- ARCHFLAGS="-std=c++11"
- PIP_UPDATE="1"
- os: osx
- PYTHON_BUILD=true
- BREW_BUNDLE=false
- name: "klayout python2 osx10.12"
os: osx
osx_image: xcode8.3 # macOS 10.12
env:
- MATRIX_EVAL="brew install python2 || brew link --overwrite python@2" # deficient python2 in travis's xcode8.3 (no ssl)
- ARCHFLAGS="-std=c++11"
- PIP_UPDATE="1"
- os: osx
- PYTHON_BUILD=true
- BREW_BUNDLE=false
- name: "klayout python2 osx10.11"
os: osx
osx_image: xcode8 # macOS 10.11
env:
- MATRIX_EVAL=""
- ARCHFLAGS="-std=c++11"
- PIP_UPDATE="1"
# python 2 osx
- os: osx
- PYTHON_BUILD=true
- BREW_BUNDLE=false
# python 3 osx
- name: "klayout python3 osx10.13"
os: osx
osx_image: xcode9.4 # macOS 10.13
env:
- MATRIX_EVAL="brew update; brew bundle; shopt -s expand_aliases; alias python='python3'; alias pip='pip3';"
- MATRIX_EVAL="shopt -s expand_aliases; alias python='python3'; alias pip='pip3';"
- ARCHFLAGS="-std=c++11"
- PIP_UPDATE="1"
- os: osx
- PYTHON_BUILD=true
- BREW_BUNDLE=true
- name: "klayout python3 osx10.12"
os: osx
osx_image: xcode8.3 # macOS 10.12
env:
- MATRIX_EVAL="brew update; brew bundle; shopt -s expand_aliases; alias python='python3'; alias pip='pip3';"
- MATRIX_EVAL="shopt -s expand_aliases; alias python='python3'; alias pip='pip3';"
- ARCHFLAGS="-std=c++11"
- PIP_UPDATE="1"
- os: osx
- PYTHON_BUILD=true
- BREW_BUNDLE=true
- name: "klayout python3 osx10.11"
os: osx
osx_image: xcode8 # macOS 10.11
env:
- MATRIX_EVAL="brew update; brew bundle; shopt -s expand_aliases; alias python='python3'; alias pip='pip3';"
- MATRIX_EVAL="shopt -s expand_aliases; alias python='python3'; alias pip='pip3';"
- ARCHFLAGS="-std=c++11"
- PIP_UPDATE="1"
- os: linux
- PYTHON_BUILD=true
- BREW_BUNDLE=true
- name: "klayout python3.6 package"
os: linux
dist: trusty # Ubuntu 14.04
sudo: false
language: python
@ -46,7 +73,11 @@ matrix:
env:
- MATRIX_EVAL=""
- PIP_UPDATE="1"
- os: linux
- PYTHON_BUILD=true
- BREW_BUNDLE=false
- name: "klayout python2.7 package"
os: linux
dist: trusty # Ubuntu 14.04
sudo: false
language: python
@ -54,7 +85,11 @@ matrix:
env:
- MATRIX_EVAL=""
- PIP_UPDATE="1"
- os: linux
- PYTHON_BUILD=true
- BREW_BUNDLE=false
- name: "klayout python2.6 package"
os: linux
dist: trusty # Ubuntu 14.04
sudo: false
language: python
@ -62,7 +97,11 @@ matrix:
env:
- MATRIX_EVAL=""
- PIP_UPDATE="0" # setuptools installed from last pip has syntax error on py 2.6
- os: linux
- PYTHON_BUILD=true
- BREW_BUNDLE=false
- name: "klayout python3.3 package"
os: linux
dist: trusty # Ubuntu 14.04
sudo: false
language: python
@ -70,7 +109,11 @@ matrix:
env:
- MATRIX_EVAL=""
- PIP_UPDATE="1"
- os: linux
- PYTHON_BUILD=true
- BREW_BUNDLE=false
- name: "klayout python3.4 package"
os: linux
dist: trusty # Ubuntu 14.04
sudo: false
language: python
@ -78,7 +121,11 @@ matrix:
env:
- MATRIX_EVAL=""
- PIP_UPDATE="1"
- os: linux
- PYTHON_BUILD=true
- BREW_BUNDLE=false
- name: "klayout python3.5 package"
os: linux
dist: trusty # Ubuntu 14.04
sudo: false
language: python
@ -86,12 +133,82 @@ matrix:
env:
- MATRIX_EVAL=""
- PIP_UPDATE="1"
- PYTHON_BUILD=true
- BREW_BUNDLE=false
# KLayout builds for mac
# Python 3
- name: "KLayout macOS 10.13 with py3.7"
os: osx
osx_image: xcode9.4 # macOS 10.13
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=B37
- MACOS_VERSION=HighSierra
- KLAYOUT_BUILD=true
- BREW_BUNDLE=true
- name: "KLayout macOS 10.12 with py3.7"
os: osx
osx_image: xcode8.3 # macOS 10.12
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=B37
- MACOS_VERSION=Sierra
- KLAYOUT_BUILD=true
- BREW_BUNDLE=true
- name: "KLayout macOS 10.11 with py3.7"
os: osx
osx_image: xcode8 # macOS 10.11
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=B37
- MACOS_VERSION=ElCapitan
- KLAYOUT_BUILD=true
- BREW_BUNDLE=true
# Python 2
- name: "KLayout macOS 10.13 with py2.7"
os: osx
osx_image: xcode9.4 # macOS 10.13
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=Sys
- MACOS_VERSION=HighSierra
- KLAYOUT_BUILD=true
- BREW_BUNDLE=true
- name: "KLayout macOS 10.12 with py2.7"
os: osx
osx_image: xcode8.3 # macOS 10.12
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=Sys
- MACOS_VERSION=Sierra
- KLAYOUT_BUILD=true
- BREW_BUNDLE=true
- name: "KLayout macOS 10.11 with py2.7"
os: osx
osx_image: xcode8 # macOS 10.11
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=Sys
- MACOS_VERSION=ElCapitan
- KLAYOUT_BUILD=true
- BREW_BUNDLE=true
before_install:
- env
- rvm install ruby --latest
- gem install dropbox-deployment
- eval "${MATRIX_EVAL}"
- if [ "$BREW_BUNDLE" = true ]; then
find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.rb' | xargs grep 'EOS.undent' --files-with-matches | xargs sed -i '' 's/EOS.undent/EOS/';
brew update;
brew bundle;
fi
- if [ "${PIP_UPDATE}" == "1" ]; then
pip --version;
pip install --upgrade pip || sudo pip install --upgrade pip;
@ -100,15 +217,20 @@ before_install:
fi
- python -c "import distutils.sysconfig as sysconfig; print(sysconfig.__file__)"
install:
- python setup.py build
- python setup.py bdist_wheel
- python setup.py install
script:
- python -c 'import klayout.db as db; print(dir(db))'
- python -c 'import klayout.rdb as rdb; print(dir(rdb))'
- python -c 'import klayout.tl as tl; print(dir(tl))'
- if [ "$PYTHON_BUILD" = true ]; then
python setup.py build;
python setup.py bdist_wheel;
python setup.py install;
mkdir -p deploy/dist-pymod;
cp -a dist/* deploy/dist-pymod/;
python -c 'import klayout.db as db; print(dir(db))';
python -c 'import klayout.rdb as rdb; print(dir(rdb))';
python -c 'import klayout.tl as tl; print(dir(tl))';
fi
- if [ "$KLAYOUT_BUILD" = true ]; then
./travis-build.sh;
fi
after_success:
- dropbox-deployment

View File

@ -1,2 +1,4 @@
tap "homebrew/core"
brew "python3"
brew "python@2", link: false
brew "qt"

View File

@ -5,11 +5,23 @@
For details see:
https://github.com/klayoutmatthias/klayout/wiki/klayout---Standalone-KLayout-Python-Module
0.25.5 (2018-12-30):
0.25.5 (2018-09-30):
* YET TO BE RELEASED
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/162
GDS2 LIBNAME was not maintained on "File/Save".
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/166
Internal error when writing GDS files (breaking of polygons)
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/172
DEF reader did not pull vias from LEF
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/174
Performance issue with many layers with width >1
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/175
Painting issue with texts
* Bugfix: some potential memory corruption issues fixed
During the efforts for making the code base compatible
with MSVC, some potential candidates for memory corruption
have been identified and fixed.
These fixes are included in this release.
0.25.4 (2018-08-25):
* Bugfix: https://github.com/klayoutmatthias/klayout/issues/121

View File

@ -6,9 +6,10 @@ klayout (0.26-1) unstable; urgency=low
klayout (0.25.5-1) unstable; urgency=low
* YET TO BE RELEASED
* New features and bugfixes
- See changelog
-- Matthias Köfferlein <matthias@koefferlein.de> Sat, 30 Dec 2018 23:15:23 +0200
-- Matthias Köfferlein <matthias@koefferlein.de> Sun, 30 Sep 2018 23:02:44 +0200
klayout (0.25.4-1) unstable; urgency=low

51
Makefile Normal file
View File

@ -0,0 +1,51 @@
.PHONY: help build deploy test dropbox-deploy
GITCOMMIT := $(shell git rev-parse --short HEAD)
KLAYOUT_VERSION := $(shell source version.sh && echo $$KLAYOUT_VERSION)
.ONESHELL:
default: help
help:
@echo "For Mac OS only"
@echo "make build PYTHON_VERSION=B37"
@echo "make deploy PYTHON_VERSION=B37"
@echo "make test MACOS_VERSION=HighSierra"
@echo "Valid Mac OS Versions: [Yosemite, ElCapitan, Sierra, HighSierra]"
@echo "Valid Python Version: [nil, Sys, B37]"
build:
@echo "Building for Mac $(GITCOMMIT)"
./build4mac.py -p $(PYTHON_VERSION) -q Qt5Brew -c; \
./build4mac.py -p $(PYTHON_VERSION) -q Qt5Brew
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; \
ln -s klayout.app/Contents/MacOS/klayout klayout; \
export TESTTMP=testtmp; \
export TESTSRC=..; \
./ut_runner -h || true; \
cd ..
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; \
rm work-KLayout.dmg

View File

@ -1,4 +1,4 @@
deploy:
dropbox_path: /Builds/klayout-pymod # The path to the folder on Dropbox where the files will go
artifacts_path: dist # can be a single file, or a path
dropbox_path: /Builds/klayout # The path to the folder on Dropbox where the files will go
artifacts_path: deploy # can be a single file, or a path
debug: true # if you want to see more logs

View File

@ -148,8 +148,9 @@ class Config(object):
elif platform.system() == "Darwin":
return []
else:
# Avoids many "type-punned pointer" warnings
return ["-Wno-strict-aliasing"]
return ["-Wno-strict-aliasing", # Avoids many "type-punned pointer" warnings
"-std=c++0x", # because we use unordered_map/unordered_set
]
def link_args(self, mod):
"""
@ -173,7 +174,7 @@ class Config(object):
# build path and the loader will fail.
args = []
args += ['-Wl,-soname,' + self.libname_of(mod)]
if not '_dbpi' in mod:
if '_dbpi' not in mod:
loader_path = '$ORIGIN'
else:
loader_path = '$ORIGIN/..'