[Request] [+ ] D8813: tests: make test-install.t work on debian systems

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Fri Jul 24 22:25:24 UTC 2020


spectral created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8813

AFFECTED FILES
  tests/test-install.t

CHANGE DETAILS

diff --git a/tests/test-install.t b/tests/test-install.t
--- a/tests/test-install.t
+++ b/tests/test-install.t
@@ -187,6 +187,14 @@
 #if py3 ensurepip
   $ "$PYTHON" -m venv installenv >> pip.log
 
+Hack: Debian does something a bit different in ensurepip.bootstrap. This makes
+it so that pip thinks the 'wheel' wheel is installed so it can build wheels;
+when it goes to try, however, it shells out to run `python3 -u <setup.py>`,
+that *doesn't* get the 'wheel' wheel, and it fails with an invalid command
+'bdist_wheel'. To fix this, we just delete the wheel from where Debian put it in
+our virtual env. Then pip doesn't think it's installed and doesn't try to build.
+  $ rm installenv/share/python-wheels/wheel-*.whl >/dev/null 2>&1 || true
+
 Note: we use this weird path to run pip and hg to avoid platform differences,
 since it's bin on most platforms but Scripts on Windows.
   $ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log



To: spectral, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200724/eec8cfc9/attachment.html>


More information about the Mercurial-patches mailing list