diff --git a/.travis.yml b/.travis.yml index 4fe284fb0..4dcb2f7ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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; diff --git a/ci-scripts/docker/docker_build.sh b/ci-scripts/docker/docker_build.sh index b511f879f..2f6d68710 100755 --- a/ci-scripts/docker/docker_build.sh +++ b/ci-scripts/docker/docker_build.sh @@ -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 + diff --git a/src/pymod/__init__.py.qtless b/src/pymod/__init__.py.qtless index dce96f8e4..6aef40aa9 100644 --- a/src/pymod/__init__.py.qtless +++ b/src/pymod/__init__.py.qtless @@ -1,5 +1,4 @@ - # klayout library definition file -__all__ = [ "tl", "db", "lay", "rdb" ] +__all__ = [ "tl", "db", "rdb" ] diff --git a/src/pymod/distutils_src/pya/__init__.py b/src/pymod/distutils_src/pya/__init__.py index ae97d592a..70e2f49b9 100644 --- a/src/pymod/distutils_src/pya/__init__.py +++ b/src/pymod/distutils_src/pya/__init__.py @@ -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