|
1 | 1 | # Pip is not a workflow management tool
|
2 | 2 |
|
3 |
| -The core purpose of pip is to *install packages*. Whilst installing packages is |
4 |
| -an important part of most Python development workflows, it is only one part. |
5 |
| -Managing a development workflow is, in itself, a complex task and one where |
6 |
| -there are many views on the "correct approach". |
| 3 | +The core purpose of pip is to *manage the packages installed in your |
| 4 | +environment*. Whilst package management is an important part of most Python |
| 5 | +development workflows, it is only one part. Tasks like creating and managing |
| 6 | +environments, configuring and running development tasks, managing the Python |
| 7 | +interpreter itself, and managing the overall "project", are not part of pip's |
| 8 | +scope. Managing a development workflow as a whole is a complex task and one |
| 9 | +where there are many views on the "correct approach". |
7 | 10 |
|
8 | 11 | Pip has a number of features which make it useful in development workflows - for
|
9 | 12 | example, the ability to install the current project via `pip install .`,
|
10 | 13 | editable installs, and requirements files. However, there is no intention that
|
11 | 14 | pip will manage the workflow as a whole.
|
12 | 15 |
|
| 16 | +As an example, pip provides the `pip wheel` command, which can be used to build |
| 17 | +a wheel for your project. However, there is no corresponding command to build a |
| 18 | +source distribution. This is because building a wheel is a fundamental step in |
| 19 | +installing a package (if that package is only available as source code), whereas |
| 20 | +building a source distribution is never needed when installing. Users who need a |
| 21 | +tool to build their project should use a dedicated tool like `build`, which |
| 22 | +provides commands to build wheels and source distributions. |
| 23 | + |
| 24 | + |
13 | 25 | ## The role of `ensurepip`
|
14 | 26 |
|
15 | 27 | Pip is available in a standard Python installation, via the `ensurepip` stdlib
|
16 | 28 | module. This provides users with an "out of the box" installer, which can be
|
17 | 29 | used to gain access to all of the various tools and libraries available on PyPI.
|
18 |
| -In particular, this includes a number of workflow tools. |
| 30 | +In particular, this enables the installation of a number of workflow tools. |
19 | 31 |
|
20 | 32 | This "bootstrapping" mechanism was proposed (and accepted) in [PEP
|
21 | 33 | 453](https://www.python.org/dev/peps/pep-0453/).
|
| 34 | + |
| 35 | + |
| 36 | +## Further information |
| 37 | + |
| 38 | +The [Packaging User Guide](https://packaging.python.org) discusses Python |
| 39 | +project development, and includes tool recommendations for people looking for |
| 40 | +further information on how to manage their development workflow. |
0 commit comments