mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
bpo-40669: Install PEG benchmarking dependencies in a venv (GH-20183)
Create a `make venv` target, that creates a virtual environment and installs the dependency in that venv. `make time` and all the related targets are changed to use the virtual environment python. Automerge-Triggered-By: @pablogsal
This commit is contained in:
parent
2135e10dc7
commit
dc31800f86
3 changed files with 29 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python3.9
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import ast
|
||||
|
@ -6,7 +6,12 @@ import sys
|
|||
import os
|
||||
from time import time
|
||||
|
||||
import memory_profiler
|
||||
try:
|
||||
import memory_profiler
|
||||
except ModuleNotFoundError:
|
||||
print("Please run `make venv` to create a virtual environment and install"
|
||||
" all the dependencies, before running this script.")
|
||||
sys.exit(1)
|
||||
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from peg_extension import parse
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue