Mercurial > hg
comparison tests/test-install.t @ 45368:d71693f799a0
tests: make test-install.t work on debian systems
Debian systems, at least as of their version of python3.8 on my machine, have
rewritten some logic in ensurepip to make it not use the wheels in pip._bundled,
but instead to use wheels installed in /usr/share/python-wheels. It copies these
wheels into the virtual environment when it's created, and installenv/bin/pip is
able to see them and use them, so it thinks that 'wheel' is installed, and that
it can build the mercurial wheel instead of just installing it. For some reason,
when it subprocesses to run `python3 setup.py bdist_wheel`, it setup.py does
*not* have the 'wheel' wheel available, and we get an error message.
Differential Revision: https://phab.mercurial-scm.org/D8813
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Fri, 24 Jul 2020 15:03:14 -0700 |
parents | 357d8415aa27 |
children | 1b5e0d0bdb05 |
comparison
equal
deleted
inserted
replaced
45367:53af26aa5951 | 45368:d71693f799a0 |
---|---|
185 $ unset PYTHONPATH | 185 $ unset PYTHONPATH |
186 | 186 |
187 #if py3 ensurepip | 187 #if py3 ensurepip |
188 $ "$PYTHON" -m venv installenv >> pip.log | 188 $ "$PYTHON" -m venv installenv >> pip.log |
189 | 189 |
190 Hack: Debian does something a bit different in ensurepip.bootstrap. This makes | |
191 it so that pip thinks the 'wheel' wheel is installed so it can build wheels; | |
192 when it goes to try, however, it shells out to run `python3 -u <setup.py>`, | |
193 that *doesn't* get the 'wheel' wheel, and it fails with an invalid command | |
194 'bdist_wheel'. To fix this, we just delete the wheel from where Debian put it in | |
195 our virtual env. Then pip doesn't think it's installed and doesn't try to build. | |
196 $ rm installenv/share/python-wheels/wheel-*.whl >/dev/null 2>&1 || true | |
197 | |
190 Note: we use this weird path to run pip and hg to avoid platform differences, | 198 Note: we use this weird path to run pip and hg to avoid platform differences, |
191 since it's bin on most platforms but Scripts on Windows. | 199 since it's bin on most platforms but Scripts on Windows. |
192 $ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log | 200 $ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log |
193 Failed building wheel for mercurial (?) | 201 Failed building wheel for mercurial (?) |
194 $ ./installenv/*/hg debuginstall || cat pip.log | 202 $ ./installenv/*/hg debuginstall || cat pip.log |