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