Skip to content

Commit

Permalink
docs/packages: Add quick "Creating distribution packages" section.
Browse files Browse the repository at this point in the history
Needs more details.
  • Loading branch information
Paul Sokolovsky committed Dec 12, 2017
1 parent da34b6e commit 54cd6e3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/reference/packages.rst
Expand Up @@ -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
---------------------

Expand Down

0 comments on commit 54cd6e3

Please sign in to comment.