Skip to content

Releases

pipInstall2 2.4.1

Choose a tag to compare

@stuartofmt stuartofmt released this 25 Nov 17:22

pipInstall2 2.4.1, 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.4.0

  • Security: no commands go through a shell; git+ URLs are checked (https, ssh or file only); pip options such as --extra-index-url, -r and --user are refused; requirements files must be inside the plugin's dsf folder; passwords and tokens in git URLs are hidden in the log
  • The venv is kept between runs instead of being rebuilt every time. It is still rebuilt for a different Python version (e.g. after upgrading Bookworm to Trixie), if it is broken, or with the new --clear entry. Packages that are no longer listed are removed
  • Works without a network when nothing new is needed - the pip upgrade gives up after a few seconds instead of holding up the install
  • Each package is downloaded once per run (a cache of its own for each run, deleted at the end)
  • Wrong results fixed: two entries asking for different versions of one package, or a later entry changing a package an earlier one asked for, now fail (exit code 10) instead of reporting success
  • Modules from apt that pip has no information about (e.g. libcamera, pykms) are found without importing them. A version condition on an import name (e.g. gi>=3.40) stops with exit code 11 and names the PyPI package to use
  • Clearer errors: the reason is logged when the venv cannot be created; unexpected errors exit with code 9 instead of 1 ("no manifest")

Behaviour change: because the venv is kept, a package with no version condition keeps the version it was first installed with. Use a condition (e.g. >=2.0) or --clear to get a newer one.

Full list: change-notes.md

pipInstall2 2.4.0

Choose a tag to compare

@stuartofmt stuartofmt released this 19 Nov 09:29

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.

pipInstall2 2.1.0

Choose a tag to compare

@stuartofmt stuartofmt released this 18 Nov 10:04

pipInstall2 2.1.0

Install: download pipInstall2.py below and follow the installation notes in pipInstall2.md.

Changes in 2.1.0

  • Added support for a period in package names, e.g. keyrings.alt
  • Added support for spaces in entries
  • Added support for control arguments, e.g. --user in --user dsf-python
  • Changed version determination to give better insight