Skip to content

pipInstall2 2.4.0

Choose a tag to compare

@stuartofmt stuartofmt released this 19 Nov 09:29
· 10 commits to master since this release

pipInstall2 2.4.0, for DSF 3.6 and 3.7.

Install: download pipInstall2.py below and follow Installation Notes.

Documentation: README.md · special_cases.md · change-notes.md

Highlights since 2.1.0

  • Packages are listed in one or more requirements files (or directly in sbcPythonDependencies), with comments allowed
  • A dry run logs what will be installed, including dependencies, and warns about packages that will be built from source (with a check for the basic build tools)
  • All packages are installed together so pip chooses versions that work together, falling back to one at a time if that fails
  • pip check is run after installing; incompatible packages exit with the new exit code 16
  • --python<condition> (e.g. --python>=3.11) sets the Python version a plugin needs (exit code 15 if not met)
  • pip runs with --prefer-binary and --no-cache-dir; --force-reinstall was removed and --user is ignored
  • Clearer result summary, with pip's reason for each failed package

Changes since 2.4.0-beta.2

  • After installing, pip check is run. If the plugin's packages are not compatible with each other (e.g. one needs numpy>=2 but numpy<2 was installed), they are listed and pipInstall2 exits with the new exit code 16
  • When installing one module at a time, each module gets its own dry run first, so a build from source is reported (with the build tools check) before it starts
  • The result summary gives pip's reason for each failed module, e.g. No matching distribution found for json==2.0.0, instead of its state before the install
  • Packages that were already available are described as installed in the venv or found in the system packages, instead of "previously installed by Pip"
  • pip's "Ignored the following versions that require a different python version" lines are only shown with --verbose
  • An entry that looks like a mistyped requirements file name (e.g. requirements.txt1) now stops with exit code 13, instead of being looked up on PyPI as a package
  • When the pip cache is disabled (normal under DSF), the cache purge no longer logs pip's warning and error - it is logged at debug level only
  • pip is run with --prefer-binary, so a version with a ready-built wheel is chosen over building a newer version from source
  • The dry run log marks packages that will be built from source, with a warning that building can take a long time, and checks for the basic build tools (C and C++ compilers, Python headers, pkg-config), logging any that are missing with the apt command to install them

For all changes since 2.1.0 see change-notes.md.