Micropy install should install packages
- Dominant language
- Python
- Stars
- 337
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
I'm opening this in the hopes of a fruitful conversation... my proposal may not be the best path.
**Is your feature request related to a problem? Please describe.**
micropy install doesn't install packages, it installs stubs.
This is counter intuitive to how "install" is used in the Python world. Issue #106 is an example of this, my guess you've had this conversation before with others.
**Describe the solution you'd like**
micropy should actually do the install and should install packages into src/lib/ as the default behavior.
**Describe alternatives you've considered**
One option would be to rename install to `micropy stub-package`. but it would be the most awesome and helpful if it actually did the install.
**Additional context**
There are a couple of approaches to look into:
1. Call `micropython -m upip` directly.
2. Merge [micropip.py](https://github.com/peterhinch/micropython-samples/tree/master/micropip) into micropy-cli
I believe option 1 is less fragile long-term because of the danger-warning Peter puts in the comments of micropip.py. I submitted a PR today to MP to add Unix Port installation instructions without doing a build. You can easily install micropython on Linux and MacOS. Windows is unclear. Checks would need to be added to verify micropython is installed and micropython would then need to fail gracefully.
#2 is cleaner and has less dependencies. It should be possible to fix micropip's logic when it is merged to account for Paul's concerns (which I don't yet understand completely).
I'm curious what you think Braden..
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the implementation of the `micropy install` command and compare its current stub behavior with the proposed `micropython -m upip` approach. Review issue #106 and the linked micropip.py discussion, then determine how installation into `src/lib/`, missing-MicroPython checks, and graceful failure should be defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100