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

贡献者指南