Show More
@@ -61,7 +61,6 import re | |||||
61 | import shlex |
|
61 | import shlex | |
62 | import shutil |
|
62 | import shutil | |
63 | import signal |
|
63 | import signal | |
64 | import site |
|
|||
65 | import socket |
|
64 | import socket | |
66 | import subprocess |
|
65 | import subprocess | |
67 | import sys |
|
66 | import sys | |
@@ -3272,7 +3271,17 class TestRunner: | |||||
3272 | self._hgcommand = b'hg' |
|
3271 | self._hgcommand = b'hg' | |
3273 |
|
3272 | |||
3274 | if self.options.wheel: |
|
3273 | if self.options.wheel: | |
3275 | suffix = _sys2bytes(site.USER_SITE[len(site.USER_BASE) + 1 :]) |
|
3274 | # pip installing a wheel does not have an --install-lib flag | |
|
3275 | # so we have to guess where the file will be installed. | |||
|
3276 | # | |||
|
3277 | # In addition, that location is not really stable, so we are | |||
|
3278 | # using awful symlink trrick later in `_installhg` | |||
|
3279 | v_info = sys.version_info | |||
|
3280 | suffix = os.path.join( | |||
|
3281 | b"lib", | |||
|
3282 | b"python%d.%d" % (v_info.major, v_info.minor), | |||
|
3283 | b"site-packages", | |||
|
3284 | ) | |||
3276 | else: |
|
3285 | else: | |
3277 | suffix = os.path.join(b"lib", b"python") |
|
3286 | suffix = os.path.join(b"lib", b"python") | |
3278 | self._pythondir = os.path.join(self._installdir, suffix) |
|
3287 | self._pythondir = os.path.join(self._installdir, suffix) | |
@@ -3826,7 +3835,8 class TestRunner: | |||||
3826 | wheel_path, |
|
3835 | wheel_path, | |
3827 | b"--force", |
|
3836 | b"--force", | |
3828 | b"--ignore-installed", |
|
3837 | b"--ignore-installed", | |
3829 |
b"-- |
|
3838 | b"--prefix", | |
|
3839 | self._installdir, | |||
3830 | b"--break-system-packages", |
|
3840 | b"--break-system-packages", | |
3831 | ] |
|
3841 | ] | |
3832 | if not WINDOWS: |
|
3842 | if not WINDOWS: | |
@@ -3917,6 +3927,16 class TestRunner: | |||||
3917 |
|
3927 | |||
3918 | makedirs(self._pythondir) |
|
3928 | makedirs(self._pythondir) | |
3919 | makedirs(self._bindir) |
|
3929 | makedirs(self._bindir) | |
|
3930 | if self.options.wheel is not None and not WINDOWS: | |||
|
3931 | # the wheel instalation location is not stable, so try to deal with | |||
|
3932 | # that to funnel it back where we need its. | |||
|
3933 | # | |||
|
3934 | # (mostly deals with Debian shenanigans) | |||
|
3935 | assert self._pythondir.endswith(b'site-packages') | |||
|
3936 | lib_dir = os.path.dirname(self._pythondir) | |||
|
3937 | dist_dir = os.path.join(lib_dir, b'dist-packages') | |||
|
3938 | os.symlink(b'./site-packages', dist_dir) | |||
|
3939 | os.symlink(b'.', os.path.join(self._installdir, b'local')) | |||
3920 |
|
3940 | |||
3921 | vlog("# Running", cmd) |
|
3941 | vlog("# Running", cmd) | |
3922 | with open(installerrs, "wb") as logfile: |
|
3942 | with open(installerrs, "wb") as logfile: |
General Comments 0
You need to be logged in to leave comments.
Login now