| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,8 @@ | |||
| 10 | 10 | import logging | |
| 11 | 11 | import os | |
| 12 | 12 | import os.path as osp | |
| 13 | + import subprocess | ||
| 14 | + import sys | ||
| 13 | 15 | import tempfile | |
| 14 | 16 | import textwrap | |
| 15 | 17 | import time | |
@@ -411,6 +413,13 @@ def __init__(self, env_dir, *, with_pip): | |||
| 411 | 413 | self._env_dir = env_dir | |
| 412 | 414 | venv.create(self.env_dir, symlinks=True, with_pip=with_pip) | |
| 413 | 415 | ||
| 416 | + if with_pip: | ||
| 417 | + # The upgrade_deps parameter to venv.create is 3.9+ only, so do it this way. | ||
| 418 | + command = [self.python, "-m", "pip", "install", "--upgrade", "pip"] | ||
| 419 | + if sys.version_info < (3, 12): | ||
| 420 | + command.append("setuptools") | ||
| 421 | + subprocess.check_output(command) | ||
| 422 | + | ||
| 414 | 423 | @property | |
| 415 | 424 | def env_dir(self): | |
| 416 | 425 | """The top-level directory of the environment.""" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments