1. pkumar
  2. packaging_cpython

Commits

Kelsey Hightower  committed 5768a70

Adding 'Getting help' section to the pysetup tutorial.

  • Participants
  • Parent commits f947466
  • Branches default

Comments (0)

Files changed (1)

File Doc/packaging/enduser/pysetup/tutorial.rst

View file
  • Ignore whitespace
 
 Pysetup makes it easy to find out what Python packages are installed::
 
-   $ pysetup search project
+   $ pysetup search virtualenv
    virtualenv 1.6 at /opt/python3.3/lib/python3.3/site-packages/virtualenv-1.6-py3.3.egg-info
 
    $ pysetup search --all
    pyverify 0.8.1 at /opt/python3.3/lib/python3.3/site-packages/pyverify-0.8.1.dist-info
+   virtualenv 1.6 at /opt/python3.3/lib/python3.3/site-packages/virtualenv-1.6-py3.3.egg-info
    wsgiref 0.1.2 at /opt/python3.3/lib/python3.3/wsgiref.egg-info
    ...
 
 
    $ pysetup install project-1.0.tar.gz
 
-Installing from a source directory containing a valid :file:`setup.py` or :file:`setup.cfg`::
+Installing from a source directory containing a valid :file:`setup.py` or
+:file:`setup.cfg`::
 
    $ cd path/to/source/directory
    $ pysetup install
 
 
       There are three metadata versions, 1.0, 1.1, and 1.2. The following PEPs
-      describes specifics of the field names, and their semantics and usage.
+      describe specifics of the field names, and their semantics and usage.
       1.0 :PEP:`241`, 1.1 :PEP:`314`,  and 1.2 :PEP:`345`
 
 
 Removing a distribution
 -----------------------
 
-You can remove one or more installed distributions using the pysetup `remove` action::
+You can remove one or more installed distributions using the `pysetup remove`
+command.::
 
    $ pysetup remove virtualenv
    removing 'virtualenv':
    Proceed (y/n)? y
    success: removed 6 files and 1 dirs
 
-The '-y' optional argument auto confirms, skipping the the conformation prompt.::
+The optional '-y' argument auto confirms, skipping the the conformation prompt.::
 
   $ pysetup remove virtualenv -y
 
 
+Getting help
+------------
+
+All pysetup actions take the `-h` and `--help` options which prints the commands help string to stdout.
+
+::
+
+   $ pysetup remove -h
+   Usage: pysetup remove dist [-y]
+      or: pysetup remove --help
+
+   Uninstall a Python package.
+
+   positional arguments:
+      dist  installed distribution name
+
+   optional arguments:
+      -y  auto confirm package removal
+
+Getting a list of all pysetup actions and global options.::
+
+   $ pysetup --help
+   Usage: pysetup [options] action [action_options]
+
+   Actions:
+       run: Run one or several commands
+       metadata: Display the metadata of a project
+       install: Install a project
+       remove: Remove a project
+       search: Search for a project
+       graph: Display a graph
+       create: Create a Project
+
+   To get more help on an action, use:
+
+       pysetup action --help
+
+   Global options:
+       --verbose (-v)  run verbosely (default)
+       --quiet (-q)    run quietly (turns verbosity off)
+       --dry-run (-n)  don't actually do anything
+       --help (-h)     show detailed help message
+       --no-user-cfg   ignore pydistutils.cfg in your home directory
+       --version       Display the version
+
+