Skip to content

Commit 4ad767d

Browse files
committed
dev: update venvstarter
1 parent f9438c6 commit 4ad767d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tools/bootstrap_venvstarter.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,26 @@
88
deps_dir.mkdir()
99

1010
if not (deps_dir / "venvstarter.py").exists():
11+
if "PIP_REQUIRE_VIRTUALENV" in os.environ:
12+
del os.environ["PIP_REQUIRE_VIRTUALENV"]
1113
os.system(f"{sys.executable} -m pip install venvstarter -t {deps_dir}")
1214

15+
sys.path.append(str(deps_dir))
1316
venvstarter_module = runpy.run_path(str(deps_dir / "venvstarter.py"))
17+
sys.path.pop()
1418

15-
wanted_version = "0.11.0"
19+
wanted_version = "0.12.2"
1620

1721
upgrade = False
1822
VERSION = venvstarter_module.get("VERSION")
1923
if VERSION is None:
2024
upgrade = True
2125
else:
2226
Version = venvstarter_module["Version"]
23-
if Version(wanted_version) < Version(VERSION):
27+
if Version(VERSION) != Version(wanted_version):
2428
upgrade = True
2529

2630
if upgrade:
27-
os.system(f"{sys.executable} -m pip install 'venvstarter>={wanted_version}' -t {deps_dir}")
31+
os.system(f"{sys.executable} -m pip install -U 'venvstarter=={wanted_version}' -t {deps_dir}")
2832

2933
manager = runpy.run_path(str(deps_dir / "venvstarter.py"))["manager"]

0 commit comments

Comments
 (0)