pypa / installer

A low-level library for installing from a Python wheel distribution.
https://installer.readthedocs.io/
MIT License
126 stars 51 forks source link

prefix always ends with /local/ on ubuntu #176

Closed nlgranger closed 1 year ago

nlgranger commented 1 year ago

Inside an ubuntu:22.04 container, I have installed build, installer and virtualenv in the latest version using pip. The prefix value is concatenated with /local/

Steps to reproduce:

docker run --rm -it ubuntu:22.04
apt update
apt install python3-pip git
pip install -U build installer virtualenv
git clone https://github.com/pypa/installer.git
cd installer/
python3 -m build --wheel
python3 -m installer dist/*.whl --destdir=sysroot --prefix=/someprefix
find sysroot/
nlgranger commented 1 year ago

On debian it works normally.

pradyunsg commented 1 year ago

Nothing that we can do here. This is an issue with the Python that ships with Ubuntu and the way they've modified it that breaks things.

https://discuss.python.org/t/linux-distro-patches-to-sysconfig-are-changing-pip-install-prefix-outside-virtual-environments/18240

nlgranger commented 1 year ago

I thought installer wasn't affected because it runs inside a virtualenv. Thanks for the pointer.