mirror of https://github.com/KLayout/klayout.git
Added pya compatibility module
This commit is contained in:
parent
863144603c
commit
00a124ce64
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
# klayout library definition file
|
||||
|
||||
__all__ = [ "tl", "db", "lay", "rdb", "QtCore", "QtGui", "QtXml", "QtSql", "QtNetwork", "QtDesigner" ]
|
||||
__all__ = [ "tl", "db", "rdb", "QtCore", "QtGui", "QtXml", "QtSql", "QtNetwork", "QtDesigner", "lay" ]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
# klayout library definition file
|
||||
|
||||
__all__ = [ "tl", "db", "lay", "rdb",
|
||||
__all__ = [ "tl", "db", "rdb",
|
||||
"QtCore", "QtGui", "QtNetwork", "QtSql", "QtWidgets", "QtDesigner",
|
||||
"QtMultimedia", "QtPrintSupport", "QtSvg", "QtXmlPatterns", "QtXml" ]
|
||||
"QtMultimedia", "QtPrintSupport", "QtSvg", "QtXmlPatterns", "QtXml",
|
||||
"lay" ]
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
import klayout
|
||||
import importlib
|
||||
|
||||
__all__ = []
|
||||
for m in klayout.__all__:
|
||||
mod = importlib.import_module("klayout." + m)
|
||||
for mm in mod.__all__:
|
||||
globals()[mm] = getattr(mod, mm)
|
||||
|
||||
|
|
@ -43,3 +43,22 @@ msvc {
|
|||
}
|
||||
INSTALLS += init_target
|
||||
|
||||
# And also provide the pya compatbility module here
|
||||
|
||||
msvc {
|
||||
QMAKE_POST_LINK += && (if not exist $$shell_path($$DESTDIR_PYMOD/../pya) $(MKDIR) $$shell_path($$DESTDIR_PYMOD/../pya)) && $(COPY) $$shell_path($$PWD/../distutils_src/pya/*.py) $$shell_path($$DESTDIR_PYMOD/../pya)
|
||||
} else {
|
||||
QMAKE_POST_LINK += && $(MKDIR) $$DESTDIR_PYMOD/../pya && $(COPY) $$PWD/../distutils_src/pya/*.py $$DESTDIR_PYMOD/../pya
|
||||
}
|
||||
|
||||
# INSTALLS needs to be inside a lib or app templates.
|
||||
modpyasrc_target.path = $$PREFIX/pymod/pya
|
||||
# This would be nice:
|
||||
# init_target.files += $$DESTDIR_PYMOD/pya/*
|
||||
# but some Qt versions need this explicitly:
|
||||
msvc {
|
||||
modpyasrc_target.extra = $(INSTALL_PROGRAM) $$shell_path($$DESTDIR_PYMOD/../pya/*.py) $$shell_path($(INSTALLROOT)$$PREFIX/pymod/pya)
|
||||
} else {
|
||||
modpyasrc_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/../pya/*.py $(INSTALLROOT)$$PREFIX/pymod/pya
|
||||
}
|
||||
INSTALLS += modpyasrc_target
|
||||
|
|
|
|||
Loading…
Reference in New Issue