diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-12-13 00:12:37 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-12-13 00:12:37 +0200 |
commit | 54cd6e3e4bb45f5ff649e3d31521f9a78015fb6b (patch) | |
tree | a4dfd13f3a788ef3936a638b8b0501f6d5c7f606 /docs/reference | |
parent | da34b6ef452514170e8ce1d1819070a920c2568e (diff) |
docs/packages: Add quick "Creating distribution packages" section.
Needs more details.
Diffstat (limited to 'docs/reference')
-rw-r--r-- | docs/reference/packages.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/reference/packages.rst b/docs/reference/packages.rst index 28f5f9f48..d8d198e62 100644 --- a/docs/reference/packages.rst +++ b/docs/reference/packages.rst @@ -199,6 +199,32 @@ Few notes: you may want to decrease the amount of frozen modules included. +Creating distribution packages +------------------------------ + +Distribution packages for MicroPython are created in the same manner +as for CPython or any other Python implementation, see references at +the end of chapter. "Source distribution" (sdist) format is used for +packaging. The post-processing discussed above, (and pre-processing +discussed in the following section) is achieved by using custom +"sdist" command for distutils/setuptools. Thus, packaging steps +remain the same as for standard distutils/setuptools, the user just +need to override "sdist" command implementation by passing the +appropriate argument to ``setup()`` call:: + + from setuptools import setup + import sdist_upip + + setup( + ..., + cmdclass={'sdist': sdist_upip.sdist} + ) + +The sdist_upip.py module as referenced above can be found in +`micropython-lib`: +https://github.com/micropython/micropython-lib/blob/master/sdist_upip.py + + Application resources --------------------- |