tyler314 / led_matrix

Micropython library used to control Adafruit's RGB LED matrix panel.
MIT License
3 stars 1 forks source link

distribution #5

Open untzag opened 7 years ago

untzag commented 7 years ago

perhaps https://github.com/salimfadhley/pybkick

tyler314 commented 7 years ago

We can look into this, @untzag what do you mean you want to use this as distribution?

untzag commented 7 years ago

for 'normal' python packages I'm used to using setup.py to configure instillation of the package

this is fantastic because distutils handles dependencies, compiling, and copying into the appropriate folders---this is why we are able to use the simple pip install one-liner

to me, easily installing packages (and using them as dependencies of your package) is one of the huge strengths of the python ecosystem

obviously we can't pip install or python setup.py install onto a pyboard... I think...

that said I'm not ready to commit to pybkick either---want to read about how others are loading code onto the pyboard before making a final decision here

untzag commented 7 years ago

from pybkick readme:

In your setup.py file, add 'pybkick' to install_requires. You can also add a script which calls the kick function as an entry point. This will create a command-line utility that can automatically deploy your project to the pyboard.

this is the kind of thing that I am interested in :heart_eyes:

untzag commented 7 years ago

after a bit more reading I realize that micropython does have an official package manager: upip

have not played with upip, but suspect it is the correct answer

untzag commented 7 years ago

I now understand a bit more about upip

first, I now realize that micropython can be installed on basically any unix machine by following these instructions---I have it running easily on my arch machine here

in my local micropython environment I can install and manage packages from PyPI using upip 😄

now the bad news: upip looks to download directly on the board running micropython (just like pip), so it only works on machines with internet access (including microcontrollers such as ESP8266)

@Tyler314 you and I cannot use upip for package management on our humble pyboards, at least not without some internet-endowing hardware enhancement

I think that we should proceed as follows:

1) continue with the plan of making our package upip-compatible, hosting on PyPI etc (for the sake of those using internet enabled machines, including potentially our future selves)

2) distribute onto the pyboard by simply copying the folder into the on-board memory

so now I need to read a bit more about best-practices for structuring a package for upip---I will make a PR with the basic structure in place once I understand that

very helpful forum post

tyler314 commented 7 years ago

@untzag thank you for looking into that, I completely agree with everything you said. For our sakes, copying is sufficient, but we should definitely make it compatible with the current micropython standard upip.

untzag commented 6 years ago

@Tyler314 I move that we close this issue