* Added python stubs with type hinting and documentation.
The documentation was extracted by inspecting the docstrings within each class and methods.
This should enable type hinting and checking by IDEs like VSCode.
The stubs were automatically generated, and have not been manually curated. (TODO)
* created tl ArgType to python type translator
* Fixing a pyaModule.cc bug
* almost finished stubgen
* fixing little bug in classes defined within classes
* Release version of the stubgen script. Good enough for release.
* Adding notes
* Including stubs when installing from source
* typechecking bugfix: missed checking is_iter()
* Cleaning up unused code for merge review
* Including stubs when installing from source (part deux)
* Putting the GenericDeviceExtractor name setting into the right place.
* Updating python stubs
Co-authored-by: Matthias Koefferlein <matthias@koefferlein.de>
* Applied patch as discussed in #1040
* Adding extra compilation flags to extensions #1040
tlcore, dbcore and libcore did not have compilation flags.
It failed compiling on Macos because it did not use C++11.
Co-authored-by: Thomas Ferreira de Lima <tlima@princeton.edu>
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 []
- Using "Library" rather than "Extension" for building shared libs
(does not try to export extension-specific symbols)
- Linking against import libs
- Using os.path.join consistently for backslash/slash difference
Cause: dbInit.cc:133 hardcodes the macos extension for shared libraries ('.dylib'), but setuptools builds it with '.so'.
Current solution: Since the main build's qmake respects the dylib standard, I've adapted setuptools to use '.dylib'.
I am going to test uploading klayout as module to pypi, but it requires unique naming. Therefore, there can only be one klayout-0.26.0 version. Only stable versions ("releases") should ever be uploaded. bugfix-patched versions should be named 0.26.0.post1 etc.