Closed askpatrickw closed 4 years ago
OK... the TOX warnings are probably not an issue now. I'll update the PR when I learn more.
I am still unable to run micropy though.
After all that, I ran poetry build.
poetry build
Building micropy-cli (3.3.0)
- Building sdist
- Built micropy-cli-3.3.0.tar.gz
- Building wheel
- Built micropy_cli-3.3.0-py3-none-any.whl
I installed form the wheel pip install dist/micropy_cli-3.3.0-py3-none-any.whl
And I still get a traceback
micropy help
Traceback (most recent call last):
File "/Users/askpatrickw/.pyenv/versions/381-micropy/bin/micropy", line 5, in <module>
from micropy.cli import cli
File "/Users/askpatrickw/.pyenv/versions/3.8.1/envs/381-micropy/lib/python3.8/site-packages/micropy/__init__.py", line 18, in <module>
from micropy import data, lib, project, stubs, utils
File "/Users/askpatrickw/.pyenv/versions/3.8.1/envs/381-micropy/lib/python3.8/site-packages/micropy/project/__init__.py", line 5, in <module>
from . import modules
File "/Users/askpatrickw/.pyenv/versions/3.8.1/envs/381-micropy/lib/python3.8/site-packages/micropy/project/modules/__init__.py", line 6, in <module>
from .modules import HookProxy, ProjectModule
File "/Users/askpatrickw/.pyenv/versions/3.8.1/envs/381-micropy/lib/python3.8/site-packages/micropy/project/modules/modules.py", line 9, in <module>
from micropy import utils
File "/Users/askpatrickw/.pyenv/versions/3.8.1/envs/381-micropy/lib/python3.8/site-packages/micropy/utils/__init__.py", line 11, in <module>
from . import decorators, helpers
File "/Users/askpatrickw/.pyenv/versions/3.8.1/envs/381-micropy/lib/python3.8/site-packages/micropy/utils/helpers.py", line 31, in <module>
from micropy.lib.stubber.runOnPc import make_stub_files as stubgen
ModuleNotFoundError: No module named 'micropy.lib'
Didn't mean to close that.
I also tried running make, make install, make dist.. installing the whl. Same lib error.
I'm going to stop for now. I'm stuck. :-(
Hey @askpatrickw, sorry to hear you're having some trouble w/ it.
I will add instructions on setting up a local dev env for micropy-cli soon, but the quick answer to your issue is that micropy-cli
depends on my fork of Josverl's micropython-stubber and is installed as a git submodule.
So, after cloning micropy-cli, run:
git submodule update --init --recursive
This will pull down micropython-stubber into the lib/
subpackage for you and everything should work fine from there. Feel free to let me know if you run into any other troubles! Thanks.
Bingo! That was the magic sauce. Thanks Braden!
I want to get the steps and dependencies nailed down to run and install a local build. Happy to add to the docs once this is figured out.
I think I'm missing a dependency or a setting or something as I'm seeing errors and micropy does not run. Let me know if you see something obvious.
At the end of all the steps below, micropy is unrecognized (but it is in pip list) and running
python -m micropy help
from the root of the project results in the following tracback:command-not-found-micropy.log
Based on the Github Actions Logs, here's how I did the build:
poetry install -v
(which will also build micropy-cli)poetry run tox
to run tests (it will fail for any python versions you don't have installed)I ran TOX limited it to py38 and I see the following errors which I also see in the PR runs
AND also in PR Runs
This was pip list before running poetry
Full Logs poetry-run-tox.log
I'm going to keep digging, but seems like something obvious is missing that I'm not seeing. Thanks!