Skip to content

Commit 233e51d

Browse files
committed
Use venv.create() to create virtual environments
1 parent 9bcde43 commit 233e51d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build_docs.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
import shutil
5757
import subprocess
5858
import sys
59+
import venv
5960
from bisect import bisect_left as bisect
6061
from contextlib import contextmanager, suppress
6162
from pathlib import Path
@@ -690,7 +691,7 @@ def build_venv(self) -> None:
690691
requirements.append("matplotlib>=3")
691692

692693
venv_path = self.build_root / ("venv-" + self.version.name)
693-
run([sys.executable, "-m", "venv", venv_path])
694+
venv.create(venv_path, symlinks=os.name != "nt", with_pip=True)
694695
run(
695696
[venv_path / "bin" / "python", "-m", "pip", "install", "--upgrade"]
696697
+ ["--upgrade-strategy=eager"]

0 commit comments

Comments
 (0)