BradenM/micropy-cli

Micropy install should install packages

開放

#107 建立於 2020年5月15日

 (1 則留言) (0 個反應) (0 位負責人)Python (29 個分叉)auto 404
enhancementhelp wanted

倉庫指標

星標
 (335 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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 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..

貢獻者指南