@@ -4,6 +4,7 @@ PATH="${PATH}:/usr/local/bin"
4
4
export PATH
5
5
python_pkgs=" "
6
6
python_exec=" "
7
+ PYPERF_VERSION=" 1.11.0"
7
8
#
8
9
# To make sure.
9
10
#
@@ -16,6 +17,7 @@ exit_out()
16
17
usage ()
17
18
{
18
19
echo " $1 Usage:"
20
+ echo " --pyperf_version <version number>: Version of pyperf to run, default is $PYPERF_VERSION ."
19
21
echo " --python_exec_path: Python to set via alternatives"
20
22
echo " --python_pkgs: comma seprated list of python packages to install"
21
23
source test_tools/general_setup --usage
198
200
source test_tools/general_setup " $@ "
199
201
200
202
ARGUMENT_LIST=(
203
+ " pyperf_version"
201
204
" python_exec"
202
205
" python_pkgs"
203
206
)
@@ -219,6 +222,10 @@ eval set --$opts
219
222
220
223
while [[ $# -gt 0 ]]; do
221
224
case " $1 " in
225
+ --pyperf_version)
226
+ PYPERF_VERSION=$2
227
+ shift 2
228
+ ;;
222
229
--python_exec)
223
230
python_exec=$2
224
231
shift 2
@@ -245,15 +252,12 @@ done
245
252
246
253
if [ $to_pbench -eq 0 ]; then
247
254
rm -rf pyperformance
248
- git clone https://github.com/python/pyperformance
255
+
256
+ python3 -m pip install pyperformance==$PYPERF_VERSION
249
257
if [ $? -ne 0 ]; then
250
- exit_out " Cloning of https://github.com/python/ pyperformance failed. " 1
258
+ exit_out " python3 -m pip install pyperformance== $PYPERF_VERSION : failed" 1
251
259
fi
252
260
cd pyperformance
253
- git checkout tags/1.0.4
254
- if [ $? -ne 0 ]; then
255
- exit_out " Checkout of 1.0.4 failed." 1
256
- fi
257
261
if [[ ${python_pkgs} != " " ]]; then
258
262
pkg_list=` echo $python_pkgs | sed " s/,/ /g" `
259
263
test_tools/package_install --packages " $python_pkgs " --no_packages $to_no_pkg_install
@@ -268,14 +272,6 @@ if [ $to_pbench -eq 0 ]; then
268
272
alternatives --remove-all python
269
273
alternatives --install /usr/bin/python python $python_exec 1
270
274
fi
271
- #
272
- # Install pip/pip3
273
- #
274
- wget https://bootstrap.pypa.io/get-pip.py
275
- if [[ $? -ne 0 ]]; then
276
- exit_out " Failed: wget https://bootstrap.pypa.io/get-pip.py" 1
277
- fi
278
- python3 ./get-pip.py
279
275
pip3_install psutil
280
276
pip3_install packaging
281
277
pip3_install pyparsing
0 commit comments