From 1387950bb0e51688d1b934b3e3cb9db0fe2e3cb6 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 17 Dec 2014 00:36:04 +0200 Subject: [PATCH] time: Add dummy "time" module, following renaming builtin to "utime". --- time/metadata.txt | 3 +++ time/setup.py | 18 ++++++++++++++++++ time/time.py | 1 + 3 files changed, 22 insertions(+) create mode 100644 time/metadata.txt create mode 100644 time/setup.py create mode 100644 time/time.py diff --git a/time/metadata.txt b/time/metadata.txt new file mode 100644 index 00000000..dc5f60a6 --- /dev/null +++ b/time/metadata.txt @@ -0,0 +1,3 @@ +srctype = dummy +type = module +version = 0.0.1 diff --git a/time/setup.py b/time/setup.py new file mode 100644 index 00000000..5817f03d --- /dev/null +++ b/time/setup.py @@ -0,0 +1,18 @@ +import sys +# Remove current dir from sys.path, otherwise setuptools will peek up our +# module instead of system. +sys.path.pop(0) +from setuptools import setup + + +setup(name='micropython-time', + version='0.0.1', + description='Dummy time module for MicroPython', + long_description='This is a dummy implementation of a module for MicroPython standard library.\nIt contains zero or very little functionality, and primarily intended to\navoid import errors (using idea that even if an application imports a\nmodule, it may be not using it onevery code path, so may work at least\npartially). It is expected that more complete implementation of the module\nwill be provided later. Please help with the development if you are\ninterested in this module.', + url='https://github.com/micropython/micropython/issues/405', + author='MicroPython Developers', + author_email='micro-python@googlegroups.com', + maintainer='MicroPython Developers', + maintainer_email='micro-python@googlegroups.com', + license='MIT', + py_modules=['time']) diff --git a/time/time.py b/time/time.py new file mode 100644 index 00000000..bc54271a --- /dev/null +++ b/time/time.py @@ -0,0 +1 @@ +from utime import *