upip - Self-hosted package manager
upip - Self-hosted package manager
As the number of modules written for MicroPython grows, it would be nice to install them directly on a target running MicroPython, including smaller ones, like PyBoard - instead of current situation where package manager is a wrapper around standard CPython's "pip", so running it requires full CPython3, so packages have to be "cross-installed" on a host.
I've been working towards that direction in the background for some time, and guess it's worth to have a specific aim now. I've submitted https://github.com/micropython/micropyt ... /issues/19 to track that. Any (focused) ideas and help are welcome.
I've been working towards that direction in the background for some time, and guess it's worth to have a specific aim now. I've submitted https://github.com/micropython/micropyt ... /issues/19 to track that. Any (focused) ideas and help are welcome.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
-
- Posts: 288
- Joined: Sun May 04, 2014 8:54 am
Re: Self-hosted package manager
Is your initial prototyping available somewhere?
Re: Self-hosted package manager
As usual, writing something more or less serious in uPy leads to bunch of missing dependencies and bugs. So, currently I'm implementing/fixing/polishing initial dirty hacks I have. Here's recent example, non-dummy gzip module: https://github.com/micropython/micropyt ... 22c7e58764 . To implement it, had to add support for raw DEFLATE decoding to uzlib, and turned out the module had issues with decompressing big data blocks. All those issues are fixed now. More to do.
So, I hope to spool all the prerequisites required for current prototype in the near time, and elaborate the prototype itself too.
So, I hope to spool all the prerequisites required for current prototype in the near time, and elaborate the prototype itself too.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
-
- Posts: 288
- Joined: Sun May 04, 2014 8:54 am
Re: Self-hosted package manager
I think it would be worth knowing which prerequisites are missing. Kinda hard to help when I don't know what to hack on
Re: Self-hosted package manager
As ticket quoted above mentioned, on critical path to complete self-hostedness is SSL support. There's a separate ticket for that: https://github.com/micropython/micropython/issues/952 . Other issue without solving which self-hosted package manager won't work on small-memory targets is stream support for uzlib - currently, uncompressed size is limited by the amount of continuous free memory block.
Past that, what package manager does is downloading tarballs (tar.gz) from HTTPS, and uncompessing them. The latter part is already handled (modulo memory issues above) by micropython-lib:
Past that, what package manager does is downloading tarballs (tar.gz) from HTTPS, and uncompessing them. The latter part is already handled (modulo memory issues above) by micropython-lib:
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: Self-hosted package manager
A basic working implementation is now available in https://github.com/pfalcon/micropython- ... aster/upip . Help with testing is welcome.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: Self-hosted package manager
So far I wasn't able to get back to this and thoroughly test it myself, so would like to extend request for help with testing.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: Self-hosted package manager
There unfortunately wasn't any feedback during this time. I finally sat down to make sure there're fruits of all this effort. It is able to install https://github.com/pfalcon/notes-pico , which is pretty good case of dependency handling. Then with some cleanups, upip 0.5 is released: https://pypi.python.org/pypi/micropython-upip/0.5 . I'll be preparing/submitting changes to make upip the default/recommended package manager for micropython.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: Self-hosted package manager
Can you lay out all the steps needed to test this?
Re: Self-hosted package manager
Yes:
1. Build unix version of micropython, make sure it's available in PATH.
2. Bootstrap upip using script from: https://github.com/micropython/micropython/pull/1219
3. Clone https://github.com/pfalcon/notes-pico
4. Use "make lib" on it to install dependencies using upip
5. Use "make run" to start the webapp.
6. Following printed link, try to add/delete some notes.
1. Build unix version of micropython, make sure it's available in PATH.
2. Bootstrap upip using script from: https://github.com/micropython/micropython/pull/1219
3. Clone https://github.com/pfalcon/notes-pico
4. Use "make lib" on it to install dependencies using upip
5. Use "make run" to start the webapp.
6. Following printed link, try to add/delete some notes.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/