mirror of https://github.com/KLayout/klayout.git
fixing pya module. adding tests
This commit is contained in:
parent
a288b3ce39
commit
6b37e67de6
|
|
@ -478,6 +478,7 @@ script:
|
|||
python setup.py bdist_wheel;
|
||||
python setup.py install;
|
||||
python -m unittest testdata/pymod/import_db.py testdata/pymod/import_rdb.py testdata/pymod/import_tl.py;
|
||||
python testdata/pymod/pya_tests.py;
|
||||
klayout_version=$(python -c 'import setup; print(setup.Config().version())');
|
||||
mkdir -p deploy/dist-pymod/$klayout_version;
|
||||
cp -a dist/* deploy/dist-pymod/$klayout_version;
|
||||
|
|
|
|||
|
|
@ -69,3 +69,5 @@ TEST_HOME=/io/testdata
|
|||
"/opt/python/$PY_VERSION/bin/python" $TEST_HOME/pymod/import_db.py || exit 1
|
||||
"/opt/python/$PY_VERSION/bin/python" $TEST_HOME/pymod/import_rdb.py || exit 1
|
||||
"/opt/python/$PY_VERSION/bin/python" $TEST_HOME/pymod/import_tl.py || exit 1
|
||||
"/opt/python/$PY_VERSION/bin/python" $TEST_HOME/pymod/pya_tests.py || exit 1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
# klayout library definition file
|
||||
|
||||
__all__ = [ "tl", "db", "lay", "rdb" ]
|
||||
__all__ = [ "tl", "db", "rdb" ]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
# import all packages from klayout, such as klayout.db and klayout.tl
|
||||
# WARNING: doing it manually until it becomes impractical
|
||||
# TODO: We need a specification document explaining what should go into pya
|
||||
|
||||
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)
|
||||
|
||||
from klayout.db import * # noqa
|
||||
from klayout.tl import * # noqa
|
||||
from klayout.rdb import * # noqa
|
||||
|
|
|
|||
Loading…
Reference in New Issue