Skip to content

Commit

Permalink
Change: Don't use --prefix argument with pip
Browse files Browse the repository at this point in the history
Using the `--prefix` argument is broken with newer pip versions and at
least Python 3.10. The distros are patching CPython's sysconfig module
which breaks our expected behavior if the `--prefix` argument . Because
the default install prefix is already `/usr/local` we just can remove
the `--prefix` argument to circumvent the bug.

See the following links for details:

* pypa/pip#11651
* pypa/pip#10978
* https://discuss.python.org/t/linux-distro-patches-to-sysconfig-are-changing-pip-install-prefix-outside-virtual-environments/18240
  • Loading branch information
bjoernricks committed Dec 12, 2022
1 parent 1024f5c commit ff88611
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/22.4/source-build/notus-scanner/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
cd $SOURCE_DIR/notus-scanner-$NOTUS_VERSION
python3 -m pip install . --prefix=$INSTALL_PREFIX --root=$INSTALL_DIR --no-warn-script-location
python3 -m pip install . --root=$INSTALL_DIR --no-warn-script-location
sudo cp -rv $INSTALL_DIR/* /
3 changes: 1 addition & 2 deletions src/common/source-build/gvm-tools/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ commands can be used:
.. code-block::
:caption: Installing gvm-tools system-wide
python3 -m pip install --prefix=$INSTALL_PREFIX --root=$INSTALL_DIR --no-warn-script-location gvm-tools
python3 -m pip install --root=$INSTALL_DIR --no-warn-script-location gvm-tools
sudo cp -rv $INSTALL_DIR/* /
3 changes: 1 addition & 2 deletions src/common/source-build/ospd-openvas/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
cd $SOURCE_DIR/ospd-openvas-$OSPD_OPENVAS_VERSION
python3 -m pip install . --prefix=$INSTALL_PREFIX --root=$INSTALL_DIR --no-warn-script-location
python3 -m pip install . --root=$INSTALL_DIR --no-warn-script-location
sudo cp -rv $INSTALL_DIR/* /

0 comments on commit ff88611

Please sign in to comment.