With the big push we are all working towards standards, I thought it would be interesting to outline the steps it takes to go from requesting a package to be installed to it ending up on disk (see my first
email on such an outline). After getting feedback on that outline, I then decided to try and pair each complicated step of that outline with the PEP and a library that essentially implements that step. I'm doing this to see where there might be a missing PEP and where that are missing library implementations of a specific PEP.
I've ended up with some holes on both the PEP and library side, so I'm hoping that either I'm overlooking something or that I've at least identified a place where some help might be appreciated by people.
- Specify
package requirement (PEP 508/packaging)
- Translate
name to PyPI-compatible name
- Tease out requirement
details (e.g. version, markers, etc.)
- Check if package is already
installed (PEP 376/XXX)
- Check wheel cache (XXX/XXX)
- Check PyPI for package
- Choose appropriate file
- Get list
of files (PEP 503/_)
- Calculate best-fitting wheel
(PEPs 425 & 427/XXX)
- Fallback to .tar.gz sdist if
necessary & available
- Download file
- If sdist:
- Extract
- Read pyproject.toml (PEP
518/XXX)
- Create venv
- Install build dependencies
- Static (PEP 518/_)
- Dynamic (PEP 517/XXX)
- Build wheel (PEP 517/XXX)
- Cache wheel (XXX/XXX)
- Get dependency requirements
of the wheel (PEP 566/XXX)
- Check if dependencies are
already installed (like step 2)
- Install missing dependencies (like step 12 below)
- Install wheel (PEP 427/XXX)
- To
appropriate location (e.g. user, venv, etc.)
- Library, scripts, etc. to
appropriate locations
- Record the installation (PEP 427/XXX)