Skip to content

Commit 54cd6e3

Browse files
committed
docs/packages: Add quick "Creating distribution packages" section.
Needs more details.
1 parent da34b6e commit 54cd6e3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/reference/packages.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,32 @@ Few notes:
199199
you may want to decrease the amount of frozen modules included.
200200

201201

202+
Creating distribution packages
203+
------------------------------
204+
205+
Distribution packages for MicroPython are created in the same manner
206+
as for CPython or any other Python implementation, see references at
207+
the end of chapter. "Source distribution" (sdist) format is used for
208+
packaging. The post-processing discussed above, (and pre-processing
209+
discussed in the following section) is achieved by using custom
210+
"sdist" command for distutils/setuptools. Thus, packaging steps
211+
remain the same as for standard distutils/setuptools, the user just
212+
need to override "sdist" command implementation by passing the
213+
appropriate argument to ``setup()`` call::
214+
215+
from setuptools import setup
216+
import sdist_upip
217+
218+
setup(
219+
...,
220+
cmdclass={'sdist': sdist_upip.sdist}
221+
)
222+
223+
The sdist_upip.py module as referenced above can be found in
224+
`micropython-lib`:
225+
https://github.com/micropython/micropython-lib/blob/master/sdist_upip.py
226+
227+
202228
Application resources
203229
---------------------
204230

0 commit comments

Comments
 (0)