|
| 1 | +# Pip is not a workflow management tool |
| 2 | + |
| 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". |
| 10 | + |
| 11 | +Pip has a number of features which make it useful in development workflows - for |
| 12 | +example, the ability to install the current project via `pip install .`, |
| 13 | +editable installs, and requirements files. However, there is no intention that |
| 14 | +pip will manage the workflow as a whole. |
| 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 | + |
| 25 | +## The role of `ensurepip` |
| 26 | + |
| 27 | +Pip is available in a standard Python installation, via the `ensurepip` stdlib |
| 28 | +module. This provides users with an "out of the box" installer, which can be |
| 29 | +used to gain access to all of the various tools and libraries available on PyPI. |
| 30 | +In particular, this enables the installation of a number of workflow tools. |
| 31 | + |
| 32 | +This "bootstrapping" mechanism was proposed (and accepted) in [PEP |
| 33 | +453](https://peps.python.org/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