-
Notifications
You must be signed in to change notification settings - Fork 70
Don't import Micropython framebuf in Circuitpython #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ah, my last commit is probably still off the mark then... The first If should check for cpython. I'll update it again.... |
Well not being all that familiar with Blinka, I guess I should ask is it possible to use either the Micropython OR the Circuitpython version of framebuffer with this libarary when run under Blinka? If so I should put the Try/Except block within the test for implementation.name == 'cpython' and only import adafruit_framebuf if the name is not 'cpython'. |
Normally Blinka runs on top of CPython, but it can also run on top of MicroPython. (That was actually its very original use, but running on CPython became by far the more common use case.) So #77 is to be able to use the MicroPython |
:laugh: Okay, so I need to check for all three cpython, micropython and circuitpython. I should probably also switch it so it trys the circuitpython library first when running under cpython. Do you think this PR makes sense? I think the issue that initiated it, is also solved by simply removing the incompatible framebuf library from the device flash. |
Well the Build CI doesn't like multiple imports so maybe I should just give up.... |
Let's see what is going on with the OP in #83. |
I just saw your comment on the issue, that does change things a bit, this seems like much more of an edge case now and I've probably spent way too much time on it.... |
@RetiredWizard I'm closing this for now because the #83 problem may not be pervasive. We can always reopen it. |
fixes #83
I suspect the import of framebuf.mpy was intended to allow this library to be used in Micropython, not for the Micropython version of framebuf.mpy to be used in Circuitpython.