-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyenvit.sh
53 lines (41 loc) · 1.27 KB
/
pyenvit.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
# fail on error
set -e
set -o pipefail
# shortcut vars
declare -r VER='3.8.10'
declare -r PE="$(cygpath --unix "${PYENV_ROOT}/versions")"
declare -r PR="$(cygpath --unix "${ASV_PLAT_PORTS}/python")"
declare -ar locarr=(
# pyenv symlink install
"${PE}/asv-${VER}-rel"
"${PE}/asv-${VER}-dbg"
# pyenv symlink virtualenv
"${PE}/glue-run-rel"
"${PE}/glue-run-dbg"
# python root virtualenvs
"${PR}/envs/glue-run-rel"
"${PR}-debug/envs/glue-run-dbg"
# python symlink bin
"${PR}/bin"
"${PR}-debug/bin"
)
echo "clean and relink"
# drop old versions
rm -rvf ${locarr[@]}
# symlink python root bin on windows
ln -s "${PR}/Scripts" "${PR}/bin"
ln -s "${PR}-debug/Scripts" "${PR}-debug/bin"
# symlink Python Build "install" into pyenv versions
ln -s "${PR}" "${PE}/asv-${VER}-rel"
ln -s "${PR}-debug" "${PE}/asv-${VER}-dbg"
# use pyenv to make virtualenvs from the builds
declare ORIGPATH="${PATH}"
export PATH="${PE}/asv-${VER}-rel/DLLs:${ORIGPATH}"
echo
echo "pyenv virtualenv "asv-${VER}-rel" 'glue-run-rel'"
time pyenv virtualenv "asv-${VER}-rel" 'glue-run-rel'
export PATH="${PE}/asv-${VER}-dbg/DLLs:${ORIGPATH}"
echo
echo "pyenv virtualenv "asv-${VER}-dbg" 'glue-run-dbg'"
time pyenv virtualenv "asv-${VER}-dbg" 'glue-run-dbg'