8000 Usability: Improve "tools/mpy_cross_all" to invoke the "mpy-cross" program coming from the mpy_cross distribution by amotl · Pull Request #35 · pfalcon/pycopy · GitHub
[go: up one dir, main page]

Skip to content

Usability: Improve "tools/mpy_cross_all" to invoke the "mpy-cross" program coming from the mpy_cross distribution #35

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

Closed
wants to merge 1 commit into from

Conversation

amotl
Copy link
Contributor
@amotl amotl commented Jul 29, 2019

Dear @pfalcon, @dpgeorge, @stinos, @dhylands and all maintainers of good faith in MicroPython tooling,

first things first: Thank you so much for your amazing work on MicroPython and its ecosystem - you know who you are.

Introduction

Coming from micropython/micropython#4955 and building upon micropython/micropython#3040 and micropython/micropython#3057, we enabled tools/mpy_cross_all.py to invoke the mpy-cross program through the B351 fine mpy-cross distribution package.

Setup

The operator will be able to decide to selectively install specific versions of mpy-cross like

source .venv2/bin/activate
pip install mpy-cross=1.9.4

into the Python environment running on her workstation.

Usage

Description

When running it from a Python environment where the mpy_cross modules is installed, mpy_cross_all.py will attempt to invoke mpy-cross from the mpy_cross distribution.

Otherwise, it will go down the established route of invoking mpy-cross directly, essentially expecting it to reside somewhere on $PATH.

Synopsis

source .venv2/bin/activate
time python tools/mpy_cross_all.py --out dist-packages-mpy dist-packages

real	0m0.439s
user	0m0.152s
sys	0m0.247s

We hope you like this.

With kind regards,
Andreas.

if installed within the current environment instead of invoking directly
@pfalcon
Copy link
Owner
pfalcon commented Jul 30, 2019

Thanks for your patch.

Pycopy is a principled project, with "right vs wrong" principles clearly (hopefully) described at https://github.com/pfalcon/pycopy#the-pycopy-zen .

This patch contradicts those principles on a few accounts:

  • It makes mpy_cross_all.py more complex, without clearly describing the need for this, whereas Pycopy's aim is simplicity.
  • The patch itself is complex, clearly not optimized for minimal impact, ease of review or maintenance.
  • Pycopy's goal is to be self-hosted and full-stack language, to be able to run its own support tools. This patch represents retrograde action of adding dependency on outside project(s), whereas the goal is to get rid of such dependencies in tools which still have them.

Thus, it's not a good fit for Pycopy, sorry.

@pfalcon pfalcon closed this Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0