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:
Lysandros Nikolaou 2020-05-18 21:27:40 +03:00 committed by GitHub
parent 2135e10dc7
commit dc31800f86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 15 deletions

View file

@ -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