File tree Expand file tree Collapse file tree 4 files changed +22
-11
lines changed Expand file tree Collapse file tree 4 files changed +22
-11
lines changed Original file line number Diff line number Diff line change
1
+ name : Test
2
+
1
3
on : [ push ]
2
4
3
5
jobs :
Original file line number Diff line number Diff line change
1
+ # Contributing
2
+
1
3
## Context
2
4
3
5
This action is built as a composite action, for more details kindly refer
Original file line number Diff line number Diff line change 1
- name : ' Setup python amazon linux'
1
+ name : ' Setup python on amazon linux'
2
2
description : ' Adds support to install python in amazon linux'
3
3
inputs :
4
4
python-version :
@@ -11,6 +11,13 @@ inputs:
11
11
runs :
12
12
using : " composite"
13
13
steps :
14
+ - name : Ensure dependencies of python are installed
15
+ shell : bash
16
+ run : |
17
+ sudo yum groupinstall -y "Development Tools"
18
+ sudo yum install -y gcc openssl-devel bzip2-devel libffi-devel
19
+ sudo yum install -y tar gzip wget
20
+
14
21
- name : Find exact python version
15
22
id : find-exact-python-version
16
23
shell : bash
47
54
shell : bash
48
55
run : |
49
56
installation_directory=${{ steps.set-installation-directory.outputs.installation_directory }}
50
- echo "${installation_directory}/bin" >> ${GITHUB_PATH}
57
+ echo "${installation_directory}/bin" >> "${GITHUB_PATH}"
58
+
59
+ echo "The following python binaries are now available in the PATH"
60
+ ls "${installation_directory}/bin"
61
+
62
+ echo "Linking python libraries.."
63
+ ls "${installation_directory}/lib"
64
+ ldconfig "${installation_directory}/lib"
51
65
52
66
branding :
53
67
icon : ' code'
Original file line number Diff line number Diff line change @@ -4,12 +4,6 @@ set -euo pipefail
4
4
5
5
# Follows the guidelines from https://realpython.com/installing-python/#how-to-build-python-from-source-code
6
6
7
- function setup_build_prerequisites() {
8
- sudo yum groupinstall -y " Development Tools"
9
- sudo yum install -y tar gzip wget
10
- sudo yum install -y gcc openssl-devel bzip2-devel libffi-devel
11
- }
12
-
13
7
function set_aliases() {
14
8
ln -sf " ${python_installation_dir} /bin/python3" " ${python_installation_dir} /bin/python"
15
9
ln -sf " ${python_installation_dir} /bin/pip3" " ${python_installation_dir} /bin/pip"
@@ -19,15 +13,14 @@ function setup_python() {
19
13
python_version=" $1 "
20
14
python_installation_dir=" $2 "
21
15
22
- setup_build_prerequisites
23
-
24
16
mkdir -p " ${python_installation_dir} "
25
17
temp_dir=$( mktemp -d)
26
18
pushd " ${temp_dir} " > /dev/null
27
19
wget " https://www.python.org/ftp/python/${python_version} /Python-${python_version} .tgz"
28
20
tar -zxf " Python-${python_version} .tgz"
29
21
pushd " Python-${python_version} " > /dev/null
30
- ./configure --enable-optimizations --prefix=" ${python_installation_dir} "
22
+ # Have not added --enable-optimizations flag because that shoots up the build time by ~5 minutes
23
+ ./configure --prefix=" ${python_installation_dir} " --enable-shared
31
24
make -j 8
32
25
make install
33
26
popd > /dev/null
You can’t perform that action at this time.
0 commit comments