commit | author | age
|
640d77
|
1 |
.. _wiki2_distributing_your_application: |
SP |
2 |
|
e26700
|
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 |
4337a2
|
9 |
current working directory contains the ``tutorial`` package and the |
MM |
10 |
``setup.py`` file. |
e26700
|
11 |
|
CM |
12 |
On UNIX: |
|
13 |
|
3a89ff
|
14 |
.. code-block:: bash |
e26700
|
15 |
|
f73f0e
|
16 |
$ $VENV/bin/python setup.py sdist |
e26700
|
17 |
|
CM |
18 |
On Windows: |
|
19 |
|
a651b3
|
20 |
.. code-block:: doscon |
e26700
|
21 |
|
5d9fd5
|
22 |
c:\tutorial> %VENV%\Scripts\python setup.py sdist |
e26700
|
23 |
|
CM |
24 |
The output of such a command will be something like: |
|
25 |
|
|
26 |
.. code-block:: text |
|
27 |
|
|
28 |
running sdist |
5d9fd5
|
29 |
# more output |
e26700
|
30 |
creating dist |
3a89ff
|
31 |
Creating tar archive |
b3e608
|
32 |
removing 'tutorial-0.0' (and everything under it) |
e26700
|
33 |
|
b29848
|
34 |
Note that this command creates a tarball in the ``dist`` subdirectory named |
4a8e9a
|
35 |
``tutorial-0.0.tar.gz``. You can send this file to your friends to show them |
SP |
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 |
5d9fd5
|
39 |
it can be downloaded via ``pip install`` remotely like any other package people |
SP |
40 |
download from PyPI. |