On 3 March 2018 at 06:55, Brett Cannon <br...@python.org> wrote:

> I have a project idea, but before I start it I need to make sure that I
> have the high-order steps necessary to go from `pip install pip=9.0.1` to
> it actually ending up on disk. Now I'm only considered with
> modern/bleeding-edge, spec-based stuff, so PEP 517/518 and no setup.py, etc.
> Anyway, if people can point out any steps the below outline is missing I
> would appreciate it. Thanks!
>    1. Specify package requirement
>       1. Translate name to PyPI-compatible name
>       2. Tease out requirement details (e.g. version, markers, etc.)
>    2. Check if package is already installed
Depending on the installer design, a local download/build cache may be
checked before checking PyPI (and since you include a caching step later,
you'll presumably want to cover the caching step as well).

>    1. Check PyPI for package
>    2. Choose appropriate file
>       1. Get list of files
>       2. Calculate best-fitting wheel
>       3. Fallback to .tar.gz sdist
>    3. Download file
>    4. If sdist:
>       1. Extract
>       2. Read pyproject.toml
>       3. Create venv
>       4. Install build dependencies
After installing the static build dependencies, you also need to query for
any dynamic build dependencies and install them if they're requested:

This build dependency installation step can get arbitrarily complicated if
you allow build dependencies to be installed from source, so the initial
implementation in pip requires that build dependencies already be available
as wheel files (either on the index server or in the local artifact cache).


Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia

Reply via email to