Skip to content

Commit

Permalink
Add man pages for pip (#4491)
Browse files Browse the repository at this point in the history
* Add man pages to pip

* 📰
  • Loading branch information
pradyunsg authored and dstufft committed Jul 5, 2017
1 parent 34100d4 commit bf4c613
Show file tree
Hide file tree
Showing 16 changed files with 327 additions and 3 deletions.
29 changes: 27 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import os
import sys
import glob

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

Expand Down Expand Up @@ -82,7 +83,7 @@

# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = ['build']
exclude_patterns = ['_build/', 'man/']

# The reST default role (used for this markup: `text`) to use for all documents
# default_role = None
Expand Down Expand Up @@ -204,7 +205,7 @@
'index',
'pip.tex',
u'pip Documentation',
u'The pip developers',
u'pip developers',
'manual',
),
]
Expand All @@ -225,3 +226,27 @@

# If false, no module index is generated.
# latex_use_modindex = True

# -- Options for Manual Pages -------------------------------------------------

# List of manual pages generated
man_pages = [
(
'man/pip',
'pip',
u'package manager for Python packages',
u'pip developers',
1
)
]

# Here, we crawl the entire man/commands/ directory and list every file with
# appropriate name and details
for fname in glob.glob('man/commands/*.rst'):
fname_base = fname[:-4]
outname = 'pip-' + fname_base[13:]
description = u'description of {} command'.format(
outname.replace('-', ' ')
)

man_pages.append((fname_base, outname, description, u'pip developers', 1))
20 changes: 20 additions & 0 deletions docs/man/commands/check.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

=========
pip-check
=========

Description
***********

.. pip-command-description:: check

Usage
*****

.. pip-command-usage:: check

Options
*******

.. pip-command-options:: check
20 changes: 20 additions & 0 deletions docs/man/commands/config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

==========
pip-config
==========

Description
***********

.. pip-command-description:: config

Usage
*****

.. pip-command-usage:: config

Options
*******

.. pip-command-options:: config
20 changes: 20 additions & 0 deletions docs/man/commands/download.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

============
pip-download
============

Description
***********

.. pip-command-description:: download

Usage
*****

.. pip-command-usage:: download

Options
*******

.. pip-command-options:: download
20 changes: 20 additions & 0 deletions docs/man/commands/freeze.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

==========
pip-freeze
==========

Description
***********

.. pip-command-description:: freeze

Usage
*****

.. pip-command-usage:: freeze

Options
*******

.. pip-command-options:: freeze
20 changes: 20 additions & 0 deletions docs/man/commands/hash.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

========
pip-hash
========

Description
***********

.. pip-command-description:: hash

Usage
*****

.. pip-command-usage:: hash

Options
*******

.. pip-command-options:: hash
20 changes: 20 additions & 0 deletions docs/man/commands/help.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

========
pip-help
========

Description
***********

.. pip-command-description:: help

Usage
*****

.. pip-command-usage:: help

Options
*******

.. pip-command-options:: help
20 changes: 20 additions & 0 deletions docs/man/commands/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

===========
pip-install
===========

Description
***********

.. pip-command-description:: install

Usage
*****

.. pip-command-usage:: install

Options
*******

.. pip-command-options:: install
20 changes: 20 additions & 0 deletions docs/man/commands/list.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

========
pip-list
========

Description
***********

.. pip-command-description:: list

Usage
*****

.. pip-command-usage:: list

Options
*******

.. pip-command-options:: list
20 changes: 20 additions & 0 deletions docs/man/commands/search.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

==========
pip-search
==========

Description
***********

.. pip-command-description:: search

Usage
*****

.. pip-command-usage:: search

Options
*******

.. pip-command-options:: search
20 changes: 20 additions & 0 deletions docs/man/commands/show.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

========
pip-show
========

Description
***********

.. pip-command-description:: show

Usage
*****

.. pip-command-usage:: show

Options
*******

.. pip-command-options:: show
20 changes: 20 additions & 0 deletions docs/man/commands/uninstall.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

=============
pip-uninstall
=============

Description
***********

.. pip-command-description:: uninstall

Usage
*****

.. pip-command-usage:: uninstall

Options
*******

.. pip-command-options:: uninstall
20 changes: 20 additions & 0 deletions docs/man/commands/wheel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:orphan:

=========
pip-wheel
=========

Description
***********

.. pip-command-description:: wheel

Usage
*****

.. pip-command-usage:: wheel

Options
*******

.. pip-command-options:: wheel
56 changes: 56 additions & 0 deletions docs/man/pip.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
:orphan:

========
Man Page
========

SYNOPSIS
********

pip <command> [options]

DESCRIPTION
***********

pip is the PyPA recommended package manager for Python packages

OPTIONS
*******

.. pip-general-options::

COMMANDS
********

pip-install(1)
Install packages.

pip-download(1)
Download packages.

pip-uninstall(1)
Uninstall packages.

pip-freeze(1)
Output installed packages in requirements format.

pip-list(1)
List installed packages.

pip-show(1)
Show information about installed packages.

pip-check(1)
Verify installed packages have compatible dependencies.

pip-search(1)
Search PyPI for packages.

pip-wheel(1)
Build wheels from your requirements.

pip-hash(1)
Compute hashes of package archives.

pip-help(1)
Show help for pip commands.
1 change: 1 addition & 0 deletions news/4491.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Man Pages for pip
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ install_command = python -m pip install {opts} {packages}
[testenv:docs]
deps = sphinx == 1.6.1
basepython = python2.7
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -W -b man -d {envtmpdir}/doctrees docs docs/_build/man

[testenv:packaging]
deps =
Expand Down

0 comments on commit bf4c613

Please sign in to comment.