Steve Piercy
2018-05-19 f8f1b7e019d51250e940901ab0703d0b442c2860
commit | author | age
93a7a1 1 .. _wiki_distributing_your_application:
SP 2
e53e13 3 =============================
CM 4 Distributing Your Application
5 =============================
6
4a8e9a 7 Once your application works properly, you can create a "tarball" from it by
SP 8 using the ``setup.py sdist`` command.  The following commands assume your
5d9fd5 9 current working directory contains the ``tutorial`` package and the
SP 10 ``setup.py`` file.
e53e13 11
CM 12 On UNIX:
13
bad5f3 14 .. code-block:: bash
e53e13 15
f73f0e 16    $ $VENV/bin/python setup.py sdist
e53e13 17
CM 18 On Windows:
19
a651b3 20 .. code-block:: doscon
e53e13 21
beb4f1 22    c:\tutorial> %VENV%\Scripts\python setup.py sdist
e53e13 23
CM 24 The output of such a command will be something like:
25
26 .. code-block:: text
27
28    running sdist
bad5f3 29    # more output
e53e13 30    creating dist
bad5f3 31    Creating tar archive
4a8e9a 32    removing 'tutorial-0.0' (and everything under it)
e53e13 33
4a8e9a 34 Note that this command creates a tarball in the "dist" subdirectory named
SP 35 ``tutorial-0.0.tar.gz``.  You can send this file to your friends to show them
36 your cool new application.  They should be able to install it by pointing the
1117bc 37 ``pip install`` command directly at it. Or you can upload it to `PyPI
7e2cc0 38 <https://pypi.org/>`_ and share it with the rest of the world, where
1cb30e 39 it can be downloaded via ``pip install`` remotely like any other package people
4a8e9a 40 download from PyPI.