Skip to content

sage-pip-install: Try installing without --no-deps first #32492

@mkoeppe

Description

@mkoeppe

We currently use pip install with the option --no-deps - which suppresses installation of runtime dependencies, as we rely on our own dependency management.

In order to make package upgrades (which might change dependencies) more robust, we change this to first attempt an install without --no-deps. Since we still use --no-index (we also throw in a --no-cache in this ticket), it will not actually attempt to install from PyPI but fail with an error.
We then issue a warning (for developers) but fall back to the install with --no-deps (for robustness for users).

(Prompted by #31280 comment:93, #30974 comment:14)

We also pass --ignore-requires-python in the wheel-building phase and in the retry. This simplifies the Python 3.10 preparation and is otherwise harmless.

To test:

eval ./configure $(./config.status --config) --with-sage-venv=`pwd`/venv-32492
make build 
grep -B2 -r "Warning.*try.*no-deps" logs/pkgs

(this will rebuild all Python packages in a new venv)

In particular highly parallel builds reveal a few missing dependencies -- but there should be no new errors.

Fixing the dependencies will be done in follow-up ticket #32493, not here.

Depends on #29847
Depends on #32361

CC: @dimpase @seblabbe @jhpalmieri

Component: build

Author: Matthias Koeppe

Branch/Commit: 92c855c

Reviewer: John Palmieri

Issue created by migration from https://trac.sagemath.org/ticket/32492

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions