@@ -11,7 +11,6 @@ export LAMBDA_BUILD_HOOK_PRE_BUILD="${LAMBDA_PRE_BUILD_SCRIPT:-.lambda-build-hoo
11
11
# Directory where custom shared libraries shall be placed in order to be loaded automatically.
12
12
export LAMBDA_SHARED_LIB_DIR=" ${LAMBDA_SHARED_LIB_DIR:- ${LAMBDA_WORK_DIR} / lib} "
13
13
14
- export LAMBDA_PYTHON2_RELEASE=" ${LAMBDA_PYTHON2_RELEASE:- -unknown} "
15
14
export LAMBDA_PYTHON3_RELEASE=" ${LAMBDA_PYTHON3_RELEASE:- -unknown} "
16
15
export LAMBDA_NODEJS_RELEASE=" ${LAMBDA_NODEJS_RELEASE:- -unknown} "
17
16
@@ -36,24 +35,6 @@ function build_prepare() {
36
35
" ${LAMBDA_WORK_DIR} /" " ${LAMBDA_BUILD_DIR} /"
37
36
}
38
37
39
- function build_python2() {
40
- LAMBDA_PACKAGE_NAME=" ${LAMBDA_PACKAGE_NAME:- $LAMBDA_NAME .python${LAMBDA_PYTHON2_RELEASE} } "
41
-
42
- log_stage " Start python2 build"
43
- log_info " Python: $( python2 --version) ($( which python2) )"
44
- log_info " Pip: $( pip2 --version) ($( which pip2) )"
45
-
46
- log_stage " Install python requirements"
47
- pip2 install -r requirements.txt -t " $LAMBDA_BUILD_DIR "
48
-
49
- ls -al
50
- log_stage " Store list of installed python deps"
51
- PYTHONPATH=" $LAMBDA_BUILD_DIR " pip2 freeze -r requirements.txt --local | tee " $LAMBDA_BUILD_DIR /requirements-built.txt"
52
-
53
- log_stage " Precompile python sources"
54
- python2 -m compileall " $LAMBDA_BUILD_DIR /"
55
- }
56
-
57
38
function build_python3() {
58
39
LAMBDA_PACKAGE_NAME=" ${LAMBDA_PACKAGE_NAME:- $LAMBDA_NAME .python${LAMBDA_PYTHON3_RELEASE} } "
59
40
@@ -136,7 +117,6 @@ echo -e "\
136
117
Usage: $( basename " $0 " ) <env_type> <lambda_release_name> [custom_build_command]\n\
137
118
\n\
138
119
Available env types:\n\
139
- - python2 (python$LAMBDA_PYTHON2_RELEASE ) \n\
140
120
- python3 (python$LAMBDA_PYTHON3_RELEASE ) \n\
141
121
- nodejs (nodejs$LAMBDA_NODEJS_RELEASE ) \n\
142
122
- nodejs-yarn (nodejs$LAMBDA_NODEJS_RELEASE )\
@@ -158,10 +138,9 @@ export LAMBDA_CUSTOM_BUILD_CMD="$@"
158
138
log_info " Host: $( uname -a) "
159
139
160
140
case " $LAMBDA_ENV_TYPE " in
161
- " python2" ) LAMBDA_BUILD=" python2" ;;
162
141
" python3" ) LAMBDA_BUILD=" python3" ;;
163
- " nodejs" ) LAMBDA_BUILD=" nodejs_npm" ;;
164
- " nodejs-yarn" ) LAMBDA_BUILD=" nodejs_yarn" ;;
142
+ " nodejs" ) LAMBDA_BUILD=" nodejs_npm" ;;
143
+ " nodejs-yarn" ) LAMBDA_BUILD=" nodejs_yarn" ;;
165
144
* ) echo -e " Error - unknown lambda environemnt type: $LAMBDA_ENV_TYPE \n" >&2 && show_help && exit 9 ;;
166
145
esac
167
146
0 commit comments