FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use upgraded pip in test fixture virtual environment by EliahKagan · Pull Request #1864 · gitpython-developers/GitPython · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 9 additions & 0 deletions test/lib/helper.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import logging
import os
import os.path as osp
import subprocess
import sys
import tempfile
import textwrap
import time
Expand Down Expand Up @@ -411,6 +413,13 @@ def __init__(self, env_dir, *, with_pip):
self._env_dir = env_dir
venv.create(self.env_dir, symlinks=True, with_pip=with_pip)

if with_pip:
# The upgrade_deps parameter to venv.create is 3.9+ only, so do it this way.
command = [self.python, "-m", "pip", "install", "--upgrade", "pip"]
if sys.version_info < (3, 12):
command.append("setuptools")
subprocess.check_output(command)

@property
def env_dir(self):
"""The top-level directory of the environment."""
Expand Down

Back | FazBrowse Home | New Git URL