Would you accept wheel metadata in your /lib ?

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
User avatar
aivarannamaa
Posts: 171
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia
Contact:

Would you accept wheel metadata in your /lib ?

Post by aivarannamaa » Sat Jan 08, 2022 8:07 am

I'm preparing to update minipip in order to make managing MicroPython packages with minipip as similar to using pip as possible.

One of the new features would be supporting list and uninstall commands. For this to work, the install command should install some metadata along with actual modules. At the moment, the metadata installed by pip gets deleted before transferring the files to the target location.

I considered introducing a new lean metadata format for this, but re-using existing formats certainly has its benefits. So, if you did minipip install micropython-logging, would you accept having micropython-logging-0.5.2.dist-info folder next to micropython-logging folder in your /lib ? The folder would contain reduced set of wheel metadata -- RECORD (for knowing which files to delete when uninstalling) and trimmed METADATA with basic metadata. The total size of the metadata would be about 1 KB in this case.

PS. I recently noticed a remark somewhere (possibly under a GitHub issue), that Damien has plans for introducing another tool for managing packages besides or instead of upip. I'm not able to find this remark anymore. Do you know something about this?
Aivar Annamaa
https://thonny.org

User avatar
aivarannamaa
Posts: 171
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia
Contact:

Re: Would you accept wheel metadata in your /lib ?

Post by aivarannamaa » Tue Mar 22, 2022 3:11 pm

Well, at least nobody objected :) So I went for it...

It didn't go so well initially, but then I understood that "minipip" was a bit too boring name for a project. I renamed it to "pipkin" and soon ended up with https://pypi.org/project/pipkin/1.0b2/

You can read the details at PyPI's page or GitHub, but I want to highlight couple of sections, which may spark some discussion:
Unlike some of the package managers for MicroPython and CircuitPython, pipkin keeps a minimal set of package metadata (trimmed .dist-info/METADATA and .dist-info/RECORD) next to the package itself, just like pip. This enables straigthforward approach for uninstalling, listing and freezing.
...
pipkin delegates most of its work to our old friend pip. This is the reason it is able to offer so much functionality.
...
Even if clumsy at times, pipkin tries to be the proof-of-concept for demonstrating that even in the world of MicroPython and CircuitPython, we could continue publishing standard sdists and wheels on PyPI and re-use the familiar approach for package management. While introducing new formats and distribution mechanisms have their benefits, we shouldn't dismiss the standard approach yet.
...

pipkin is now used in the first beta of Thonny 4.0
Aivar Annamaa
https://thonny.org

Post Reply