From 75cdca3567c36c2853121cdf17949a34275850bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6fferlein?= Date: Sun, 24 Jun 2018 21:03:27 +0200 Subject: [PATCH] Updated KLayout Python Module Prototype (markdown) --- KLayout-Python-Module-Prototype.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/KLayout-Python-Module-Prototype.md b/KLayout-Python-Module-Prototype.md index 3ce6988..ae16587 100644 --- a/KLayout-Python-Module-Prototype.md +++ b/KLayout-Python-Module-Prototype.md @@ -5,7 +5,28 @@ Binary packages and documentation for the branch are available here: [http://www ## Building -The `klayout` module will be built together with KLayout. After KLayout installation, the `klayout` module resides inside the installation tree. To use it, either copy the `klayout` folder to your Python installation or set `PYTHONPATH` to the location of the `klayout` folder. +For building use the build script: + +``` +# From the project's root directory +./build.sh -bin +``` + +For "" pick a destination where you want KLayout to be installed. For example you can use "/usr/local/klayout" for the destination, but you will need sudo permissions then: + +``` +# Build and install in /usr/local/klayout +sudo ./build.sh -bin /usr/local/klayout +``` + +The `klayout` module will be built together with KLayout. After KLayout installation, the `klayout` module resides inside the installation tree in the "pymod" subfolder. To use it, either copy the `klayout` folder to your Python installation or set `PYTHONPATH` to the location of the `klayout` folder: + +``` +export PYTHONPATH=/pymod +python +>>> import klayout.db as db +>>> print(str(db.DBox(0, 0, 100, 200)) +``` ## Using the module