Can I package a MicroPython project for PyPI using pyproject.toml? #9814
Replies: 3 comments 6 replies
-
We put essentially all the CircuitPython libraries on PyPi; perhaps that could be helpful. We recently switched to |
Beta Was this translation helpful? Give feedback.
-
If you want to package your project for use in CPython, then yes, PyPI and pyproject.toml (or any other other ways) are the way to go. For packaging for MicroPython we take a much more light-weight approach with the (This is all new since v1.19.1 -- Some historical perspective: we used to have a We also wanted to have all this work in the same way as freezing packages into the firmware. So there are two main approaches for packaging MicroPython:
We plan to bridge the gap between these two and make it possible to register your github repos with the micropython-lib repo -- you will get all the ownership benefits of hosting in your own repo, but all the deployment (e.g. compile to .mpy, install by name) of micropython-lib. |
Beta Was this translation helpful? Give feedback.
-
I realize this post is getting a little old, but I wanted to share my recent success using package.json in a GitHub repository. The format is pretty simple. It looks like this:
Even when there's only one file like the example above, I still like the package.json approach, because it makes the mip command short and simple, requiring only the username/repo instead of a full URL. Windows:
Linux:
Very slick! Whoever thought this up and built it has my sincere appreciation. And, I'm deleting my PyPI account now. ;-) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a project that I'd like to make available as a module. I started by reading the tutorial suggested by the instructions at pypi.org. I successfully created the package and uploaded to test.pypi.org using a pyproject.toml file per the instructions in their tutorial.
Now, after looking at the MicroPython package docs I see there are subtle differences with the gzip compression and I suspect the package I created using CPython and the PyPI tutorial will not work with MicroPython.
The MicroPython doc references setup.py and the setuptools module. But, I got the feeling from PyPI's documentation that pyproject.toml is the new way of doing things and I'm left scratching my head, wondering how to proceed.
Is it possible to use pyproject.toml with MicroPython? If others have uploaded MicroPython modules to PyPI, I'm hoping you'll be willing to share some wisdom.
Beta Was this translation helpful? Give feedback.
All reactions