From e801126555459d618d39fa59b3c90c75cd4c3f12 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Mon, 6 Nov 2023 18:57:25 +0530 Subject: [PATCH 01/23] Test pip installation --- .github/workflows/test.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 270bf43..06c6eae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,3 +89,25 @@ jobs: set -x python3 --version 2>&1 | grep -F "3.9.18" + + test_package_installation_using_pip: + runs-on: ubuntu-latest + container: amazonlinux:2023 + steps: + - name: Setup runner + run: | + yum install -y git tar gzip sudo + + - uses: actions/checkout@v3 + + - name: Install python + uses: ./ + with: + python-version: 3.10 + + - name: Test installation + run: | + set -x + + pip install requests + pip3 install s4cmd From 311e4cc6be7925088752c19cbe0394ab12958b4e Mon Sep 17 00:00:00 2001 From: Kishan B Date: Mon, 6 Nov 2023 19:06:20 +0530 Subject: [PATCH 02/23] Fix yaml zero truncation --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 06c6eae..fee872e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,7 +61,7 @@ jobs: - name: Install python uses: ./ with: - python-version: 3 + python-version: "3" - name: Test installation run: | @@ -82,7 +82,7 @@ jobs: - name: Install python uses: ./ with: - python-version: 3.9 + python-version: "3.9" - name: Test installation run: | @@ -103,7 +103,7 @@ jobs: - name: Install python uses: ./ with: - python-version: 3.10 + python-version: "3.10" - name: Test installation run: | From ab5caba17b5cc9bf000784ec62919bce90904bdf Mon Sep 17 00:00:00 2001 From: Kishan B Date: Mon, 6 Nov 2023 19:45:09 +0530 Subject: [PATCH 03/23] Add test layer for amazon linux 2 for pip install case --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fee872e..79abb7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -91,8 +91,12 @@ jobs: python3 --version 2>&1 | grep -F "3.9.18" test_package_installation_using_pip: + strategy: + matrix: + amazon-linux-version: [ 2, 2023 ] + python-version: [3.8, 3.12] runs-on: ubuntu-latest - container: amazonlinux:2023 + container: amazonlinux:${{ matrix.amazon-linux-version }} steps: - name: Setup runner run: | @@ -103,7 +107,7 @@ jobs: - name: Install python uses: ./ with: - python-version: "3.10" + python-version: "${{ matrix.python-version }}" - name: Test installation run: | From 7129430d453cb1b4af86a0ba659daebd638bf9ab Mon Sep 17 00:00:00 2001 From: Kishan B Date: Mon, 6 Nov 2023 21:07:12 +0530 Subject: [PATCH 04/23] Test with additional deps --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index fdfb4b8..bb91008 100644 --- a/action.yml +++ b/action.yml @@ -17,6 +17,7 @@ runs: sudo yum groupinstall -y "Development Tools" sudo yum install -y gcc openssl-devel bzip2-devel libffi-devel sudo yum install -y tar gzip wget + sudo yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel - name: Find exact python version id: find-exact-python-version From 693cd22397d32f5c9b923a73218fdcc72bd0ec19 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 11:33:11 +0530 Subject: [PATCH 05/23] Fix Openssl version --- action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index bb91008..9b09d9b 100644 --- a/action.yml +++ b/action.yml @@ -15,9 +15,10 @@ runs: shell: bash run: | sudo yum groupinstall -y "Development Tools" - sudo yum install -y gcc openssl-devel bzip2-devel libffi-devel + sudo yum install -y gcc bzip2-devel libffi-devel + sudo yum remove -y openssl-devel.x86_64 + sudo yum install -y openssl11-devel sudo yum install -y tar gzip wget - sudo yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel - name: Find exact python version id: find-exact-python-version From 0935cfde1a311fde0e4604492aa63e5ee27eb919 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 12:32:59 +0530 Subject: [PATCH 06/23] Add caching test case to pip test harness --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79abb7c..7b61ce7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,6 +95,7 @@ jobs: matrix: amazon-linux-version: [ 2, 2023 ] python-version: [3.8, 3.12] + cache: [true, false] runs-on: ubuntu-latest container: amazonlinux:${{ matrix.amazon-linux-version }} steps: @@ -108,6 +109,7 @@ jobs: uses: ./ with: python-version: "${{ matrix.python-version }}" + cache: ${{ matrix.cache }} - name: Test installation run: | From 45480eca52af0540285979e0f0d8a5aae3e590f7 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 13:05:34 +0530 Subject: [PATCH 07/23] Refactor test pipeline --- .github/workflows/test.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b61ce7..7de9b70 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,12 +11,8 @@ jobs: amazon-linux-version: [ 2, 2023 ] # This tests the lowest supported python version and the latest stable python version # Refer - https://devguide.python.org/versions/#status-of-python-versions - python-version: - - 3.8.18 - - 3.12.0 - cache: - - true - - false + python-version: [ 3.8.18, 3.12.0 ] + cache: [ true, false ] runs-on: ubuntu-latest container: amazonlinux:${{ matrix.amazon-linux-version }} steps: @@ -94,8 +90,8 @@ jobs: strategy: matrix: amazon-linux-version: [ 2, 2023 ] - python-version: [3.8, 3.12] - cache: [true, false] + python-version: [ 3.8, 3.12 ] + cache: [ true, false ] runs-on: ubuntu-latest container: amazonlinux:${{ matrix.amazon-linux-version }} steps: From 3899d7a97d98ad67b408f50242786e459172d444 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 13:15:06 +0530 Subject: [PATCH 08/23] Install all required deps --- action.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 9b09d9b..8ed4044 100644 --- a/action.yml +++ b/action.yml @@ -15,10 +15,9 @@ runs: shell: bash run: | sudo yum groupinstall -y "Development Tools" - sudo yum install -y gcc bzip2-devel libffi-devel - sudo yum remove -y openssl-devel.x86_64 - sudo yum install -y openssl11-devel - sudo yum install -y tar gzip wget + sudo yum install -y openssl-devel zlib-devel bzip2-devel readline-devel libffi-devel \ + ncurses-devel sqlite-devel gdbm-devel tk-devel \ + tar gzip wget - name: Find exact python version id: find-exact-python-version From 319060a973b46783eb063e31a19fcb104dec931f Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 13:18:39 +0530 Subject: [PATCH 09/23] Add references --- action.yml | 1 + install-python.sh | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 8ed4044..99fc034 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,7 @@ runs: - name: Ensure dependencies of python are installed shell: bash run: | + # Reference https://stackoverflow.com/a/73208851/3316017 sudo yum groupinstall -y "Development Tools" sudo yum install -y openssl-devel zlib-devel bzip2-devel readline-devel libffi-devel \ ncurses-devel sqlite-devel gdbm-devel tk-devel \ diff --git a/install-python.sh b/install-python.sh index 969704d..c95b7e0 100755 --- a/install-python.sh +++ b/install-python.sh @@ -2,13 +2,12 @@ set -euo pipefail -# Follows the guidelines from https://realpython.com/installing-python/#how-to-build-python-from-source-code - function set_aliases() { ln -sf "${python_installation_dir}/bin/python3" "${python_installation_dir}/bin/python" ln -sf "${python_installation_dir}/bin/pip3" "${python_installation_dir}/bin/pip" } +# Reference - https://realpython.com/installing-python/#how-to-build-python-from-source-code function setup_python() { python_version="$1" python_installation_dir="$2" From ebc87700621f65f8fa4cf7e07d14e18426d08f5b Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 13:26:16 +0530 Subject: [PATCH 10/23] Install every single python system dependency --- action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 99fc034..a62e3b5 100644 --- a/action.yml +++ b/action.yml @@ -15,9 +15,10 @@ runs: shell: bash run: | # Reference https://stackoverflow.com/a/73208851/3316017 + sudo yum update -y sudo yum groupinstall -y "Development Tools" - sudo yum install -y openssl-devel zlib-devel bzip2-devel readline-devel libffi-devel \ - ncurses-devel sqlite-devel gdbm-devel tk-devel \ + sudo yum install -y openssl-devel zlib-devel bzip2 bzip2-devel readline-devel libffi-devel \ + ncurses-devel sqlite sqlite-devel gdbm-devel tk-devel xz-devel \ tar gzip wget - name: Find exact python version From 424f65248adb5728582726347ab17abbde453069 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 13:31:05 +0530 Subject: [PATCH 11/23] Add with open ssl flag --- install-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-python.sh b/install-python.sh index c95b7e0..7202b42 100755 --- a/install-python.sh +++ b/install-python.sh @@ -19,7 +19,7 @@ function setup_python() { tar -zxf "Python-${python_version}.tgz" pushd "Python-${python_version}" >/dev/null # Have not added --enable-optimizations flag because that shoots up the build time by ~5 minutes - ./configure --prefix="${python_installation_dir}" --enable-shared + ./configure --prefix="${python_installation_dir}" --enable-shared -with-openssl=/etc/pki/tls make -j 8 make install popd >/dev/null From ddfb976839145a6afad9d4225b9da5637c9ae7c0 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 13:52:07 +0530 Subject: [PATCH 12/23] Update open ssl path --- install-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-python.sh b/install-python.sh index 7202b42..8d66c26 100755 --- a/install-python.sh +++ b/install-python.sh @@ -19,7 +19,7 @@ function setup_python() { tar -zxf "Python-${python_version}.tgz" pushd "Python-${python_version}" >/dev/null # Have not added --enable-optimizations flag because that shoots up the build time by ~5 minutes - ./configure --prefix="${python_installation_dir}" --enable-shared -with-openssl=/etc/pki/tls + ./configure --prefix="${python_installation_dir}" --enable-shared --with-openssl=/usr/include/openssl make -j 8 make install popd >/dev/null From 13684a5a025bfcdda763acfe226433fba0bc1f7b Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 13:56:01 +0530 Subject: [PATCH 13/23] Optimize parallization --- install-python.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install-python.sh b/install-python.sh index 8d66c26..3cceb2e 100755 --- a/install-python.sh +++ b/install-python.sh @@ -19,8 +19,9 @@ function setup_python() { tar -zxf "Python-${python_version}.tgz" pushd "Python-${python_version}" >/dev/null # Have not added --enable-optimizations flag because that shoots up the build time by ~5 minutes + # Ref for openssl - https://gist.github.com/wizardbeard/d5b641d1fadbaba755823e16eab4dda1#file-python-3-9-slim-dockerfile-L17 ./configure --prefix="${python_installation_dir}" --enable-shared --with-openssl=/usr/include/openssl - make -j 8 + make -j "$(nproc)" make install popd >/dev/null popd From bacf12a141019687473ceda3e1d8f9a9961c33dd Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 14:02:18 +0530 Subject: [PATCH 14/23] Fix open ssl include path --- install-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-python.sh b/install-python.sh index 3cceb2e..ebd74a8 100755 --- a/install-python.sh +++ b/install-python.sh @@ -20,7 +20,7 @@ function setup_python() { pushd "Python-${python_version}" >/dev/null # Have not added --enable-optimizations flag because that shoots up the build time by ~5 minutes # Ref for openssl - https://gist.github.com/wizardbeard/d5b641d1fadbaba755823e16eab4dda1#file-python-3-9-slim-dockerfile-L17 - ./configure --prefix="${python_installation_dir}" --enable-shared --with-openssl=/usr/include/openssl + ./configure --prefix="${python_installation_dir}" --enable-shared --with-openssl=/usr/include make -j "$(nproc)" make install popd >/dev/null From 8379c1493bad8b3a138aedd800c1e8ed308b897d Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 14:38:06 +0530 Subject: [PATCH 15/23] Use with ssl flag --- install-python.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install-python.sh b/install-python.sh index ebd74a8..a1adcf1 100755 --- a/install-python.sh +++ b/install-python.sh @@ -18,9 +18,11 @@ function setup_python() { wget "https://www.python.org/ftp/python/${python_version}/Python-${python_version}.tgz" tar -zxf "Python-${python_version}.tgz" pushd "Python-${python_version}" >/dev/null - # Have not added --enable-optimizations flag because that shoots up the build time by ~5 minutes - # Ref for openssl - https://gist.github.com/wizardbeard/d5b641d1fadbaba755823e16eab4dda1#file-python-3-9-slim-dockerfile-L17 - ./configure --prefix="${python_installation_dir}" --enable-shared --with-openssl=/usr/include + # - Have not added --enable-optimizations flag because that shoots up the build time by ~5 minutes + # - Ref for openssl + # - https://gist.github.com/wizardbeard/d5b641d1fadbaba755823e16eab4dda1#file-python-3-9-slim-dockerfile-L17 + # - https://stackoverflow.com/a/29169795/3316017 + ./configure --prefix="${python_installation_dir}" --enable-shared --with-ssl make -j "$(nproc)" make install popd >/dev/null From ab2c4bdd35609641472a15f25042f47a184261b2 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 14:48:00 +0530 Subject: [PATCH 16/23] Add with-openssl-rpath --- .github/workflows/test.yml | 8 ++++---- install-python.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7de9b70..da8fb80 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Test on: [ push ] jobs: - test_setup_python: + test_python_installation: strategy: matrix: # This tests the amazon linux versions receiving standard support @@ -44,7 +44,7 @@ jobs: python --version 2>&1 | grep -F "${{ matrix.python-version }}" test "$(python3 -m pip --version)" = "$(pip --version)" - test_major_version_specification: + test_major_version_installation: runs-on: ubuntu-latest container: amazonlinux:2023 steps: @@ -65,7 +65,7 @@ jobs: python3 --version 2>&1 | grep -F "3.12.0" - test_minor_version_specification: + test_minor_version_installation: runs-on: ubuntu-latest container: amazonlinux:2023 steps: @@ -86,7 +86,7 @@ jobs: python3 --version 2>&1 | grep -F "3.9.18" - test_package_installation_using_pip: + test_pip_installs: strategy: matrix: amazon-linux-version: [ 2, 2023 ] diff --git a/install-python.sh b/install-python.sh index a1adcf1..6c9e55e 100755 --- a/install-python.sh +++ b/install-python.sh @@ -22,7 +22,7 @@ function setup_python() { # - Ref for openssl # - https://gist.github.com/wizardbeard/d5b641d1fadbaba755823e16eab4dda1#file-python-3-9-slim-dockerfile-L17 # - https://stackoverflow.com/a/29169795/3316017 - ./configure --prefix="${python_installation_dir}" --enable-shared --with-ssl + ./configure --prefix="${python_installation_dir}" --enable-shared --with-ssl --with-openssl-rpath=auto make -j "$(nproc)" make install popd >/dev/null From c580c9cdc029a4e85c624aa7bca0ceac5220050e Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 14:55:59 +0530 Subject: [PATCH 17/23] Fix openssl rpath value --- install-python.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install-python.sh b/install-python.sh index 6c9e55e..d9144cd 100755 --- a/install-python.sh +++ b/install-python.sh @@ -22,7 +22,8 @@ function setup_python() { # - Ref for openssl # - https://gist.github.com/wizardbeard/d5b641d1fadbaba755823e16eab4dda1#file-python-3-9-slim-dockerfile-L17 # - https://stackoverflow.com/a/29169795/3316017 - ./configure --prefix="${python_installation_dir}" --enable-shared --with-ssl --with-openssl-rpath=auto + # - https://stackoverflow.com/a/75880038/3316017 + ./configure --prefix="${python_installation_dir}" --enable-shared --with-ssl --with-openssl-rpath=/usr/lib64 make -j "$(nproc)" make install popd >/dev/null From c69a2ce499c1806eead670aa8082117aba2e448a Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 15:02:21 +0530 Subject: [PATCH 18/23] Specify with-openssl --- install-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-python.sh b/install-python.sh index d9144cd..35fd831 100755 --- a/install-python.sh +++ b/install-python.sh @@ -23,7 +23,7 @@ function setup_python() { # - https://gist.github.com/wizardbeard/d5b641d1fadbaba755823e16eab4dda1#file-python-3-9-slim-dockerfile-L17 # - https://stackoverflow.com/a/29169795/3316017 # - https://stackoverflow.com/a/75880038/3316017 - ./configure --prefix="${python_installation_dir}" --enable-shared --with-ssl --with-openssl-rpath=/usr/lib64 + ./configure --prefix="${python_installation_dir}" --enable-shared --with-openssl=/usr --with-openssl-rpath=/usr/lib64 make -j "$(nproc)" make install popd >/dev/null From 076621688dc765679915f58f0a307f62493482a3 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 15:11:43 +0530 Subject: [PATCH 19/23] Remove fail fast --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da8fb80..646099e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,7 @@ on: [ push ] jobs: test_python_installation: strategy: + fail-fast: false matrix: # This tests the amazon linux versions receiving standard support # Refer - https://endoflife.date/amazon-linux @@ -88,6 +89,7 @@ jobs: test_pip_installs: strategy: + fail-fast: false matrix: amazon-linux-version: [ 2, 2023 ] python-version: [ 3.8, 3.12 ] From ff3e4e1c3353566e2833b23862b81c7cd26327b6 Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 15:27:47 +0530 Subject: [PATCH 20/23] Add openssl cli --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a62e3b5..7d18b4b 100644 --- a/action.yml +++ b/action.yml @@ -17,7 +17,7 @@ runs: # Reference https://stackoverflow.com/a/73208851/3316017 sudo yum update -y sudo yum groupinstall -y "Development Tools" - sudo yum install -y openssl-devel zlib-devel bzip2 bzip2-devel readline-devel libffi-devel \ + sudo yum install -y openssl openssl-devel zlib-devel bzip2 bzip2-devel readline-devel libffi-devel \ ncurses-devel sqlite sqlite-devel gdbm-devel tk-devel xz-devel \ tar gzip wget From 6d8ba392a2ce26fea75d8b520cabac43f769b56c Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 16:26:58 +0530 Subject: [PATCH 21/23] Add openssl libs path --- install-python.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install-python.sh b/install-python.sh index 35fd831..d14ab32 100755 --- a/install-python.sh +++ b/install-python.sh @@ -23,6 +23,7 @@ function setup_python() { # - https://gist.github.com/wizardbeard/d5b641d1fadbaba755823e16eab4dda1#file-python-3-9-slim-dockerfile-L17 # - https://stackoverflow.com/a/29169795/3316017 # - https://stackoverflow.com/a/75880038/3316017 + export OPENSSL_LIBS=/usr/lib64/libssl.so ./configure --prefix="${python_installation_dir}" --enable-shared --with-openssl=/usr --with-openssl-rpath=/usr/lib64 make -j "$(nproc)" make install From fd5c51bc2ee54ac21b29d5e583616bf8ff4c507f Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 17:45:12 +0530 Subject: [PATCH 22/23] Use openssl11-devel --- .github/workflows/test.yml | 2 +- action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 646099e..dd373c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -92,7 +92,7 @@ jobs: fail-fast: false matrix: amazon-linux-version: [ 2, 2023 ] - python-version: [ 3.8, 3.12 ] + python-version: [ "3.8", "3.9", "3.10", "3.11" , "3.12" ] cache: [ true, false ] runs-on: ubuntu-latest container: amazonlinux:${{ matrix.amazon-linux-version }} diff --git a/action.yml b/action.yml index 7d18b4b..4d9eb34 100644 --- a/action.yml +++ b/action.yml @@ -17,7 +17,7 @@ runs: # Reference https://stackoverflow.com/a/73208851/3316017 sudo yum update -y sudo yum groupinstall -y "Development Tools" - sudo yum install -y openssl openssl-devel zlib-devel bzip2 bzip2-devel readline-devel libffi-devel \ + sudo yum install -y openssl11-devel zlib-devel bzip2 bzip2-devel readline-devel libffi-devel \ ncurses-devel sqlite sqlite-devel gdbm-devel tk-devel xz-devel \ tar gzip wget From 1dd565649734d57e740b1b543f0f39d51cd1479a Mon Sep 17 00:00:00 2001 From: Kishan B Date: Tue, 7 Nov 2023 18:17:02 +0530 Subject: [PATCH 23/23] Conditionally install openssl --- action.yml | 7 +------ install-system-dependencies.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100755 install-system-dependencies.sh diff --git a/action.yml b/action.yml index 4d9eb34..25b0f08 100644 --- a/action.yml +++ b/action.yml @@ -14,12 +14,7 @@ runs: - name: Ensure dependencies of python are installed shell: bash run: | - # Reference https://stackoverflow.com/a/73208851/3316017 - sudo yum update -y - sudo yum groupinstall -y "Development Tools" - sudo yum install -y openssl11-devel zlib-devel bzip2 bzip2-devel readline-devel libffi-devel \ - ncurses-devel sqlite sqlite-devel gdbm-devel tk-devel xz-devel \ - tar gzip wget + ${GITHUB_ACTION_PATH}/install-system-dependencies.sh - name: Find exact python version id: find-exact-python-version diff --git a/install-system-dependencies.sh b/install-system-dependencies.sh new file mode 100755 index 0000000..9d848b6 --- /dev/null +++ b/install-system-dependencies.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Reference https://stackoverflow.com/a/73208851/3316017 + +sudo yum update -y +sudo yum groupinstall -y "Development Tools" +if yum info "openssl11-devel" &> /dev/null; then + sudo yum install -y openssl11-devel +else + sudo yum install -y openssl-devel +fi +sudo yum install -y zlib-devel bzip2 bzip2-devel readline-devel libffi-devel \ + ncurses-devel sqlite sqlite-devel gdbm-devel tk-devel xz-devel \ + tar gzip wget