WIP: futher improvements on Python module for Qt-less case

This commit is contained in:
Matthias Koefferlein 2022-05-12 23:42:21 +02:00
parent d01ea49246
commit 5facc418cb
7 changed files with 48 additions and 35 deletions

View File

@ -1,10 +1,16 @@
recursive-include src/tl/tl *.cc *.h
recursive-include src/ant/ant *.cc *.h
recursive-include src/db/db *.cc *.cc_gen *.h
recursive-include src/edt/edt *.cc *.h
recursive-include src/gsi/gsi *.cc *.h
recursive-include src/rdb/rdb *.cc *.h
recursive-include src/pya/pya *.cc *.h
recursive-include src/img/img *.cc *.h
recursive-include src/laybasic/laybasic *.cc *.h
recursive-include src/lib/lib *.cc *.h
recursive-include src/lym/lym *.cc *.h
recursive-include src/pya/pya *.cc *.h
recursive-include src/pymod *.cc *.h
recursive-include src/rbastub *.cc *.h
recursive-include src/rdb/rdb *.cc *.h
recursive-include src/tl/tl *.cc *.h
include src/plugins/*/db_plugin/*.cc
include src/plugins/*/*/db_plugin/*.cc
include src/plugins/*/db_plugin/*.h

View File

@ -523,6 +523,23 @@ _rdb = Library(config.root + '._rdb',
sources=list(_rdb_sources))
config.add_extension(_rdb)
# ------------------------------------------------------------------
# _lay dependency library
_lay_path = os.path.join("src", "laybasic", "laybasic")
_lay_sources = set(glob.glob(os.path.join(_lay_path, "*.cc")))
_lay = Library(config.root + '._lay',
define_macros=config.macros() + [('MAKE_LAYBASIC_LIBRARY', 1)],
include_dirs=[_rdb_path, _db_path, _tl_path, _gsi_path],
extra_objects=[config.path_of('_rdb', _rdb_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_db', _db_path)],
language='c++',
libraries=config.libraries('_lay'),
extra_link_args=config.link_args('_lay'),
extra_compile_args=config.compile_args('_lay'),
sources=list(_lay_sources))
config.add_extension(_lay)
# ------------------------------------------------------------------
# _lym dependency library
@ -540,23 +557,6 @@ _lym = Library(config.root + '._lym',
sources=list(_lym_sources))
config.add_extension(_lym)
# ------------------------------------------------------------------
# _lay dependency library
_lay_path = os.path.join("src", "laybasic", "laybasic")
_lay_sources = set(glob.glob(os.path.join(_lay_path, "*.cc")))
_lay = Library(config.root + '._lay',
define_macros=config.macros() + [('MAKE_LAYBASIC_LIBRARY', 1)],
include_dirs=[_lym_path, _rdb_path, _db_path, _tl_path, _gsi_path],
extra_objects=[config.path_of('_lym', _lym_path), config.path_of('_rdb', _rdb_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_db', _db_path)],
language='c++',
libraries=config.libraries('_lay'),
extra_link_args=config.link_args('_lay'),
extra_compile_args=config.compile_args('_lay'),
sources=list(_lay_sources))
config.add_extension(_lay)
# ------------------------------------------------------------------
# _ant dependency library
@ -699,8 +699,8 @@ lay_sources = set(glob.glob(os.path.join(lay_path, "*.cc")))
lay = Extension(config.root + '.laycore',
define_macros=config.macros(),
include_dirs=[_lay_path, _tl_path, _gsi_path, _pya_path],
extra_objects=[config.path_of('_lay', _lay_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_pya', _pya_path)],
include_dirs=[_lay_path, _img_path, _ant_path, _edt_path, _lym_path, _tl_path, _gsi_path, _pya_path],
extra_objects=[config.path_of('_lay', _lay_path), config.path_of('_img', _img_path), config.path_of('_ant', _ant_path), config.path_of('_edt', _edt_path), config.path_of('_lym', _lym_path), config.path_of('_tl', _tl_path), config.path_of('_gsi', _gsi_path), config.path_of('_pya', _pya_path)],
extra_link_args=config.link_args('laycore'),
extra_compile_args=config.compile_args('laycore'),
sources=list(lay_sources))

View File

@ -64,7 +64,8 @@ lib.depends += db
buddies.depends += plugins lym $$LANG_DEPENDS
lym.depends += gsi $$LANG_DEPENDS
laybasic.depends += rdb lym
laybasic.depends += rdb
ant.depends += laybasic
img.depends += laybasic

View File

@ -337,9 +337,9 @@ HEADERS += \
laybasicCommon.h \
INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC
DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb -lklayout_lym
INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC
DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb
INCLUDEPATH += $$QTBASIC_INC
DEPENDPATH += $$QTBASIC_INC

View File

@ -2403,6 +2403,11 @@ public:
PyTypeObject *make_class (const gsi::ClassBase *cls, bool as_static)
{
// drop non-standard names
if (tl::verbosity () >= 40) {
tl::info << tl::sprintf (tl::to_string (tr ("Creating class %s.%s")), PyModule_GetName (mp_module->module ()), cls->name ());
}
// NOTE: with as_static = true, this method produces a mixin. This is a class entirely consisting
// of static constants and child classes only. It can be mixed into an existing class for emulation
// additional base classes.

View File

@ -1,12 +1,5 @@
import klayout.laycore
import klayout.antcore
import klayout.edtcore
import klayout.imgcore
import klayout.lymcore
from klayout.laycore import *
from klayout.antcore import *
from klayout.edtcore import *
from klayout.imgcore import *
from klayout.laycore import *
__all__ = klayout.laycore.__all__ + klayout.antcore.__all__ + klayout.edtcore.__all__ + klayout.imgcore.__all__ + klayout.laycore.__all__
__all__ = klayout.laycore.__all__

View File

@ -31,4 +31,12 @@
# include "../../laybasic/laybasic/laybasicForceLink.h"
#endif
// Force-include other dependencies
// NOTE: these libraries contribute to the "lay" module space. Hence we have to include them.
#include "../../ant/ant/antForceLink.h"
#include "../../img/img/imgForceLink.h"
#include "../../edt/edt/edtForceLink.h"
#include "../../lym/lym/lymForceLink.h"
DEFINE_PYMOD(laycore, "lay", "KLayout core module 'lay'")