From 816ccb58e55c97c1b470d02505a5bef564cfad77 Mon Sep 17 00:00:00 2001 From: Alexandr Reshetnikov Date: Thu, 2 Mar 2023 09:16:36 +0400 Subject: [PATCH] python 3.11.1 stripped gnu version (#46) --- .github/workflows/python.yml | 2 +- python/build_gnu.sh | 11 ++++++----- python/build_msvc.sh | 9 +++++---- python/build_musl.sh | 11 ++++++----- python/test_linux.sh | 2 +- python/test_windows.sh | 2 +- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 7108c75ef..e39ccd96e 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -73,7 +73,7 @@ jobs: uses: ./.github/workflows/release.yml with: workflow: ${{ github.workflow }} - tool_version: '3.7.9' + tool_version: '3.11.1' prepare_body: | bsdtar -Oxf ./build-musl/build-musl.tar.gz build-musl.md >> body.md bsdtar -Oxf ./build-gnu/build-gnu.tar.gz build-gnu.md >> body.md diff --git a/python/build_gnu.sh b/python/build_gnu.sh index 8bfbc1549..8cb315258 100755 --- a/python/build_gnu.sh +++ b/python/build_gnu.sh @@ -19,15 +19,15 @@ wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glib apk add --force-overwrite glibc-2.35-r0.apk tool_name="python" -tool_version="3.7.9" -release_date="20200822" +tool_version="3.11.1" +release_date="20230116" self_name="$tool_name-$tool_version" release_version_dirpath="$dp0/release/$self_name" echo "::set-output name=tool_name::$tool_name" echo "::set-output name=tool_version::$tool_version" mkdir -p "$release_version_dirpath" && cd "$dp0/release" -download_url="https://github.com/indygreg/python-build-standalone/releases/download/$release_date/cpython-$tool_version-x86_64-unknown-linux-gnu-pgo-20200823T0036.tar.zst" +download_url="https://github.com/indygreg/python-build-standalone/releases/download/$release_date/cpython-$tool_version+$release_date-x86_64-unknown-linux-gnu-pgo-full.tar.zst" cpython_zip="$dp0/release/raw_cpython-linux.tar.zst" echo "download python from $download_url ..." [[ ! -f "$cpython_zip" ]] && wget "$download_url" -O "$cpython_zip" @@ -41,7 +41,7 @@ tar -xf "$bsdtar_tar_gz" bsdtar="$dp0/release/bsdtar" cpython_bin="$dp0/.tmp/python/install/bin/python3" -cpython_dll="$dp0/.tmp/python/install/lib/libpython3.7m.so.1.0" +cpython_dll="$dp0/.tmp/python/install/lib/libpython3.11.so.1.0" if [[ ! -f "$cpython_bin" ]]; then echo extract "$cpython_zip" to "$cpython_bin" ... rm -rf "$dp0/.tmp/"* && mkdir -p "$dp0/.tmp" && cd "$dp0/.tmp" || exit 1 @@ -77,7 +77,8 @@ cp -rf "$dp0/.tmp/python/install" "$python_scripts_path/" echo "creating archive ..." cd "$release_version_dirpath" -{ printf 'Python %s +{ printf '### build-gnu.tar.gz +Python %s %s %s diff --git a/python/build_msvc.sh b/python/build_msvc.sh index 7d001bf0e..5c2302d75 100755 --- a/python/build_msvc.sh +++ b/python/build_msvc.sh @@ -3,15 +3,15 @@ dp0="$(realpath "$(dirname "$0")")" set -e tool_name="python" -tool_version="3.7.9" -release_date="20200822" +tool_version="3.11.1" +release_date="20230116" self_name="$tool_name-$tool_version" release_version_dirpath="$dp0/release/$self_name" echo "::set-output name=tool_name::$tool_name" echo "::set-output name=tool_version::$tool_version" mkdir -p "$release_version_dirpath" && cd "$dp0/release" -download_url="https://github.com/indygreg/python-build-standalone/releases/download/$release_date/cpython-$tool_version-x86_64-pc-windows-msvc-shared-pgo-20200823T0118.tar.zst" +download_url="https://github.com/indygreg/python-build-standalone/releases/download/$release_date/cpython-$tool_version+$release_date-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst" cpython_zip="$dp0/release/raw_cpython-win.tar.zst" echo "download python from $download_url ..." [[ ! -f "$cpython_zip" ]] && wget "$download_url" -O "$cpython_zip" @@ -57,7 +57,8 @@ cp -rf "$dp0/.tmp/python/install" "$python_scripts_path/" echo "creating archive ..." cd "$release_version_dirpath" -{ printf 'Python %s +{ printf '### build-msvc.tar.gz +Python %s %s %s ' "$("$cpython_bin" -c "import sys; print(sys.version)")" "$("$cpython_bin" -m pip --version)" "$download_url" diff --git a/python/build_musl.sh b/python/build_musl.sh index 5fd3d8175..3001dd17b 100755 --- a/python/build_musl.sh +++ b/python/build_musl.sh @@ -6,16 +6,16 @@ apk update apk add --no-cache alpine-sdk python3-dev tool_name="python" -tool_version="3.7.9" -release_date="20200822" +tool_version="3.11.1" +release_date="20230116" self_name="$tool_name-$tool_version" release_version_dirpath="$dp0/release/$self_name" echo "::set-output name=tool_name::$tool_name" echo "::set-output name=tool_version::$tool_version" mkdir -p "$release_version_dirpath" && cd "$dp0/release" -download_url="https://github.com/indygreg/python-build-standalone/releases/download/$release_date/cpython-$tool_version-x86_64-unknown-linux-musl-noopt-20200823T0036.tar.zst" -cpython_zip="$dp0/release/raw_cpython-windows.tar.zst" +download_url="https://github.com/indygreg/python-build-standalone/releases/download/$release_date/cpython-$tool_version+$release_date-x86_64-unknown-linux-musl-noopt-full.tar.zst" +cpython_zip="$dp0/release/raw_cpython-linux.tar.zst" echo "download python from $download_url ..." [[ ! -f "$cpython_zip" ]] && wget "$download_url" -O "$cpython_zip" @@ -62,7 +62,8 @@ cp -rf "$dp0/.tmp/python/install" "$python_scripts_path/" echo "creating archive ..." cd "$release_version_dirpath" -{ printf 'Python %s +{ printf '### build-musl.tar.gz +Python %s %s %s diff --git a/python/test_linux.sh b/python/test_linux.sh index dd72ca1b8..17eb32eca 100755 --- a/python/test_linux.sh +++ b/python/test_linux.sh @@ -20,7 +20,7 @@ Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m fi test_version() { - assertEquals "Python 3.7.9" "$(../bin/Scripts/bin/python3 --version)" + assertEquals "Python 3.11.1" "$(../bin/Scripts/bin/python3 --version)" } # Load and run shUnit2. diff --git a/python/test_windows.sh b/python/test_windows.sh index 2d7555500..56df7c241 100755 --- a/python/test_windows.sh +++ b/python/test_windows.sh @@ -1,7 +1,7 @@ #!/bin/bash test_version() { - assertEquals "Python 3.7.9" "$(../bin/Scripts/python.exe --version)" + assertEquals "Python 3.11.1" "$(../bin/Scripts/python.exe --version)" } # Load and run shUnit2.