This works:
import klayout.db
import klayout.lib
print(klayout.db.Library.library_names()) # says ["Basic"]
Also works:
from klayout import *
Does not work:
# import klayout.lib needs to be done before the libraries
# are used initially
import klayout.db
print(klayout.db.Library.library_names()) # says []
import klayout.lib
print(klayout.db.Library.library_names()) # says []
This will include the normal Python tests also
in pymod, hence aligning the test base for pymod
and pya.
This feature requires the pya compatibility module.
Python 2 is a bit more picky with respect to
the correct name of the module. If passing "db"
to a module called dbcore, it will exit with
a SystemError.
- Unify structure of Python module sources so the pymod.pri can be used for all modules
- switch to tlcore, dbcore and rdbcore + distutils_src wrapper modules
With these fixes, unit tests pass with MacOS
(set DYLD_LIBRARY_PATH!)
1.) MacOS takes popen vs. pclose seriously
By using fopen we basically spoil the system and other popen
won't work.
2.) For system integrity, MacOS does not propagate DYLD_LIBRARY_PATH
to child processes such as sh. This has to be done explictly.
3.) Search the klayout binary in the right path (klayout.app/...)
4.) Reset KLAYOUT_HOME for less intervention by installed macros
The text writer was made "normalizing": it will introduce
a certain element order (string sorting). This way, OASIS
files can be compared against golden data without
changes in the order due to different implementation of
hash containers.
Minimum build configuration is without Qt, Ruby, curl and expat.
Only Python is required.
This commit also provides a functional (through polling) Qt-less HTTP
implementation through libcurl if enabled.
* Added unit test for this
* Provided an option for easier debugging such issues:
Setting env var KLAYOUT_VERBOSITY will enable debug levels on Python
modules (and all other binaries). Plugin loading issues can
be debugged by setting KLAYOUT_VERBOSITY=21.