Open
Description
Maybe the path of the input module should be added to sys.path in the generate
script?
$ ./micropython-extmod-generator/generate testmod1
Looking for module "testmod1":
Traceback (most recent call last):
File "./micropython-extmod-generator/generate", line 241, in <module>
main()
File "./micropython-extmod-generator/generate", line 234, in main
module = Module(sys.argv[1])
File "./micropython-extmod-generator/generate", line 66, in __init__
self.module = importlib.import_module(name)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'testmod1'
$ PYTHONPATH=. ./micropython-extmod-generator/generate testmod1
Looking for module "testmod1":
Found <module 'testmod1' from '/[...]/testmod1.py'>
Parsed OK ... loaded 1 functions and 1 classes with 1 methods
Generating source code:
Done
Saved source as modtestmod1.c
Saved qstrdefs as modtestmod1-qstrdefs.h
Metadata
Metadata
Assignees
Labels
No labels
Activity