Currently upip doesn't consider distribution packages, which have more than one file per release:
|
assert len(packages) == 1 |
In some cases the publishers might find it useful to provide different content for different targets under same distribution name. For example, only small part of https://pypi.org/project/Adafruit-Blinka/ is relevant on MicroPython target (thonny/thonny#1825 (comment)).
I suggest to remove the one file restriction from upip, so that it is able to work with specially made tar.gz even if there are other assets (eg. wheels) published under same release.
I can make the pull request.
For the context -- I started to work on a tool called minipip, which is inspired by micropip.py by @peterhinch, but supports also regular pip-installable packages. If upip becomes less strict about the number of files, then (in my vision) the community can start publishing libraries with separate assests for PC (py3 wheels), CircuitPython (eg. circuitpython6 and circuitpython7 wheels) and MicroPython (eg. micropython1 wheels for installing with pip and tar.gz for installing with upip).
This issue only considers tar.gz files, but you might want to look at aivarannamaa/minipip#5 for more ideas to ponder.
Currently
upipdoesn't consider distribution packages, which have more than one file per release:micropython/tools/upip.py
Line 201 in a7a9f2f
In some cases the publishers might find it useful to provide different content for different targets under same distribution name. For example, only small part of https://pypi.org/project/Adafruit-Blinka/ is relevant on MicroPython target (thonny/thonny#1825 (comment)).
I suggest to remove the one file restriction from
upip, so that it is able to work with specially madetar.gzeven if there are other assets (eg. wheels) published under same release.I can make the pull request.
For the context -- I started to work on a tool called
minipip, which is inspired by micropip.py by @peterhinch, but supports also regular pip-installable packages. Ifupipbecomes less strict about the number of files, then (in my vision) the community can start publishing libraries with separate assests for PC (py3wheels), CircuitPython (eg.circuitpython6andcircuitpython7wheels) and MicroPython (eg.micropython1wheels for installing with pip andtar.gzfor installing withupip).This issue only considers
tar.gzfiles, but you might want to look at aivarannamaa/minipip#5 for more ideas to ponder.