Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation on pip's role as an installer #12503

Merged
merged 7 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/html/topics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ repeatable-installs
secure-installs
vcs-support
python-option
workflow
```
40 changes: 40 additions & 0 deletions docs/html/topics/workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Pip is not a workflow management tool

The core purpose of pip is to *manage the packages installed in your
environment*. Whilst package management is an important part of most Python
development workflows, it is only one part. Tasks like creating and managing
environments, configuring and running development tasks, managing the Python
interpreter itself, and managing the overall "project", are not part of pip's
scope. Managing a development workflow as a whole is a complex task and one
where there are many views on the "correct approach".

Pip has a number of features which make it useful in development workflows - for
example, the ability to install the current project via `pip install .`,
editable installs, and requirements files. However, there is no intention that
pip will manage the workflow as a whole.

As an example, pip provides the `pip wheel` command, which can be used to build
a wheel for your project. However, there is no corresponding command to build a
source distribution. This is because building a wheel is a fundamental step in
installing a package (if that package is only available as source code), whereas
building a source distribution is never needed when installing. Users who need a
tool to build their project should use a dedicated tool like `build`, which
provides commands to build wheels and source distributions.


## The role of `ensurepip`

Pip is available in a standard Python installation, via the `ensurepip` stdlib
module. This provides users with an "out of the box" installer, which can be
used to gain access to all of the various tools and libraries available on PyPI.
In particular, this enables the installation of a number of workflow tools.

This "bootstrapping" mechanism was proposed (and accepted) in [PEP
453](https://peps.python.org/pep-0453/).


## Further information

The [Packaging User Guide](https://packaging.python.org) discusses Python
project development, and includes tool recommendations for people looking for
further information on how to manage their development workflow.
Loading