@@ -37,7 +37,7 @@ setup_cache_name()
3737 if [ " $RUNNER_OS " = ' macOS' ]
3838 then
3939 . ./osx/deps.sh
40- [ " $target_python " = " ${ py_installer_version% . * } " ] || die 1 " versions mismatch: target=$target_python , installer=$py_installer_version "
40+ [ " $target_python " = " $py_installer_version " ] || die 1 " versions mismatch: target=$target_python , installer=$py_installer_version "
4141 target_python=" $py_installer_version "
4242 fi
4343 cache_name=$( " $python " - " $GITHUB_JOB " " $target_python " " $platform_name " << \EOF
@@ -66,7 +66,7 @@ setup_osx_python()
6666{
6767 target_python="$1 "
6868 . ./osx/deps.sh
69- [ "$target_python " = "${ py_installer_version% . * } " ] || die 1 "versions mismatch: target=$target_python , installer=$py_installer_version "
69+ [ "$target_python " = "$py_installer_version " ] || die 1 "versions mismatch: target=$target_python , installer=$py_installer_version "
7070 python='python3'
7171 python_dir="$cache_dir /python"
7272 if [ ! -e "$python_dir " ]
@@ -76,31 +76,12 @@ setup_osx_python()
7676 fi
7777 # Update PATH.
7878 run_eval "echo \"\$ PWD/$python_dir /Python.framework/Versions/Current/bin\" >>\$ GITHUB_PATH"
79- # Target High Sierra.
80- run_eval "echo MACOSX_DEPLOYMENT_TARGET=10.13 >>\$ GITHUB_ENV"
79+ run_eval "echo MACOSX_DEPLOYMENT_TARGET=12.0 >>\$ GITHUB_ENV"
8180 # Fix SSL certificates so plover_build_utils.download works.
8281 SSL_CERT_FILE="$( " $python " -m pip._vendor.certifi) " || die
8382 run_eval "echo SSL_CERT_FILE='$SSL_CERT_FILE ' >>\$ GITHUB_ENV"
8483}
8584
86- setup_pip_options()
87- {
88- # If the wheels cache is available, disable pip's index.
89- if [ -e "$wheels_cache " ]
90- then
91- run_eval "echo PIP_NO_INDEX=1 >>\$ GITHUB_ENV"
92- else
93- run mkdir -p "$wheels_cache "
94- fi
95- if [ "$RUNNER_OS " = 'Windows' ]
96- then
97- PIP_FIND_LINKS="$( cygpath -a -w " $wheels_cache " ) " || die
98- else
99- PIP_FIND_LINKS="$PWD /$wheels_cache "
100- fi
101- run_eval "echo PIP_FIND_LINKS='$PIP_FIND_LINKS ' >>\$ GITHUB_ENV"
102- }
103-
10485setup_python_env()
10586{
10687 python_userbase="$cache_dir /python_userbase"
@@ -133,8 +114,8 @@ publish_github_release()
133114 title="$tag "
134115 is_draft='yes'
135116 is_prerelease="$( " $python " << EOF
136- from pkg_resources import parse_version
137- version = parse_version ('$RELEASE_VERSION ')
117+ from packaging.version import parse
118+ version = parse ('$RELEASE_VERSION ')
138119print('1' if version.is_prerelease else '')
139120EOF
140121) " || die
@@ -183,10 +164,10 @@ EOF
183164 head -n20 <<<"$last_release "
184165 run_eval "last_version=\"\$ (echo -n \"\$ last_release\" | sed -n '/^# \\ w\\ + \\ ([^ ]\\ +\\ )\$ /{s//\\ 1/;P;Q0};\$ Q1')\""
185166 if python <<EOF
186- from pkg_resources import parse_version
167+ from packaging.version import parse
187168import sys
188- version = parse_version ('$RELEASE_VERSION ')
189- last_version = parse_version ('$last_version ')
169+ version = parse ('$RELEASE_VERSION ')
170+ last_version = parse ('$last_version ')
190171sys.exit(0 if version < last_version else 1)
191172EOF
192173 then
0 commit comments