diff --git a/libs/README.md b/libs/README.md new file mode 100644 index 0000000..1bf8753 --- /dev/null +++ b/libs/README.md @@ -0,0 +1,9 @@ +# Vendored MicroPyton libraries + +This directory contains some libraries that are required by examples and unit +tests. + +All libraries except `utemplate` were copied from the +[micropython-lib](https://github.com/micropython/micropython-lib) project. See +the README file in the `common/utemplate` subdirectory for details about this +library. diff --git a/src/utemplate/README.md b/libs/common/utemplate/README.md similarity index 100% rename from src/utemplate/README.md rename to libs/common/utemplate/README.md diff --git a/src/utemplate/compiled.py b/libs/common/utemplate/compiled.py similarity index 100% rename from src/utemplate/compiled.py rename to libs/common/utemplate/compiled.py diff --git a/src/utemplate/recompile.py b/libs/common/utemplate/recompile.py similarity index 100% rename from src/utemplate/recompile.py rename to libs/common/utemplate/recompile.py diff --git a/src/utemplate/source.py b/libs/common/utemplate/source.py similarity index 100% rename from src/utemplate/source.py rename to libs/common/utemplate/source.py diff --git a/tests/libs/datetime.py b/libs/micropython/datetime.py similarity index 100% rename from tests/libs/datetime.py rename to libs/micropython/datetime.py diff --git a/tests/libs/ffilib.py b/libs/micropython/ffilib.py similarity index 100% rename from tests/libs/ffilib.py rename to libs/micropython/ffilib.py diff --git a/tests/libs/time.py b/libs/micropython/time.py similarity index 100% rename from tests/libs/time.py rename to libs/micropython/time.py diff --git a/tests/libs/uasyncio/__init__.py b/libs/micropython/uasyncio/__init__.py similarity index 100% rename from tests/libs/uasyncio/__init__.py rename to libs/micropython/uasyncio/__init__.py diff --git a/tests/libs/uasyncio/core.py b/libs/micropython/uasyncio/core.py similarity index 100% rename from tests/libs/uasyncio/core.py rename to libs/micropython/uasyncio/core.py diff --git a/tests/libs/uasyncio/event.py b/libs/micropython/uasyncio/event.py similarity index 100% rename from tests/libs/uasyncio/event.py rename to libs/micropython/uasyncio/event.py diff --git a/tests/libs/uasyncio/funcs.py b/libs/micropython/uasyncio/funcs.py similarity index 100% rename from tests/libs/uasyncio/funcs.py rename to libs/micropython/uasyncio/funcs.py diff --git a/tests/libs/uasyncio/lock.py b/libs/micropython/uasyncio/lock.py similarity index 100% rename from tests/libs/uasyncio/lock.py rename to libs/micropython/uasyncio/lock.py diff --git a/tests/libs/uasyncio/manifest.py b/libs/micropython/uasyncio/manifest.py similarity index 100% rename from tests/libs/uasyncio/manifest.py rename to libs/micropython/uasyncio/manifest.py diff --git a/tests/libs/uasyncio/stream.py b/libs/micropython/uasyncio/stream.py similarity index 100% rename from tests/libs/uasyncio/stream.py rename to libs/micropython/uasyncio/stream.py diff --git a/tests/libs/uasyncio/task.py b/libs/micropython/uasyncio/task.py similarity index 100% rename from tests/libs/uasyncio/task.py rename to libs/micropython/uasyncio/task.py diff --git a/tests/libs/unittest.py b/libs/micropython/unittest.py similarity index 100% rename from tests/libs/unittest.py rename to libs/micropython/unittest.py diff --git a/run_tests.py b/run_tests.py index 3d6a1d3..2fe54a4 100644 --- a/run_tests.py +++ b/run_tests.py @@ -1,7 +1,8 @@ import sys sys.path.insert(0, 'src') -sys.path.insert(2, 'tests/libs') +sys.path.insert(2, 'libs/common') +sys.path.insert(3, 'libs/micropython') import unittest diff --git a/tox.ini b/tox.ini index 9f05951..06ad66e 100644 --- a/tox.ini +++ b/tox.ini @@ -19,6 +19,8 @@ commands= deps= pytest pytest-cov +setenv= + PYTHONPATH=libs/common [testenv:flake8] deps=