Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5db3319

Browse files
add python 3.8 support
1 parent a535490 commit 5db3319

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

‎LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Robert Peteuil
3+
Copyright (c) 2020 Robert Peteuil
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Creates an AWS Lambda Layers zip file that is **optimized** for: [Lambda Layer d
55
This function was created to address these issues:
66

77
- Many methods of creating Lambda zip files for Python functions don't work for Lambda Layers
8-
- This is due to the fact Lambda Layers require specific library paths within the zip, where regular Lambda zips dont
8+
- This is due to the fact Lambda Layers require specific library paths within the zip, unlike regular Lambda zip files
99
- Compiled dependancies must be created in an environment that matches the Lambda runtime
1010
- Reduce size of zip file by removing unnecessary libraries and files
1111

@@ -16,7 +16,7 @@ This function was created to address these issues:
1616
- Builds zip file containing Python dependancies and places the libraries into the proper directory structure for lambda layers
1717
- Ensures compiled libraries are compatible with Lambda environment by using [docker container](https://hub.docker.com/r/lambci/lambda) that mimics the lambda runtime environment
1818
- Optimized the zip size by removing `.pyc` files and unnecessary libraries
19-
- allows specifying lambda supported python versions: 2.7, 3.6and 3.7
19+
- allows specifying lambda supported python versions: 2.7, 3.6, 3.7 and 3.8
2020
- Automatically searches for requirements.txt file in several locations:
2121
- same directory as script
2222
- parent directory or script (useful when used as submodule)
@@ -51,7 +51,7 @@ git submodule update --init --recursive --remote
5151
- parent directory of script (useful when used as submodule)
5252
- function sub-directory of the parent directory (useful when used as submodule)
5353
- Optionally specify Python Version
54-
- `-p PYTHON_VER` - specifies the Python version: 2.7, 3.6, 3.7(default 3.6)
54+
- `-p PYTHON_VER` - specifies the Python version: 2.7, 3.6, 3.7, 3.8 (default 3.7)
5555

5656
## Reference - remove submodule
5757

‎_make_zip.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ set -e
88
# /python/lib/pythonX.X/site-packages
99

1010
scriptname=$(basename "0ドル")
11-
scriptbuildnum="1.0.0"
12-
scriptbuilddate="2019年03月30日"
11+
scriptbuildnum="1.0.1"
12+
scriptbuilddate="2020年05月08日"
1313

1414
### VARS
1515
CURRENT_DIR=$(reldir=$(dirname -- "0ドル"; echo x); reldir=${reldir%?x}; cd -- "$reldir" && pwd && echo x); CURRENT_DIR=${CURRENT_DIR%?x}

‎build_layer.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ set -e
1111
# Zip filename includes python version used in its creation
1212

1313
scriptname=$(basename "0ドル")
14-
scriptbuildnum="1.0.0"
15-
scriptbuilddate="2019年03月30日"
14+
scriptbuildnum="1.0.1"
15+
scriptbuilddate="2020年05月08日"
1616

1717
# used to set destination of zip
1818
SUBDIR_MODE=""
@@ -24,7 +24,7 @@ displayVer() {
2424
usage() {
2525
[[ "1ドル" ]] && echo -e "AWS Lambda Layer Zip Builder for Python Libraries\n"
2626
echo -e "usage: ${scriptname} [-p PYTHON_VER] [-s] [-r REQUIREMENTS-DIR] [-h] [-v]"
27-
echo -e " -p PYTHON_VER\t: Python version to use: 2.7, 3.6, 3.7(default 3.6)"
27+
echo -e " -p PYTHON_VER\t: Python version to use: 2.7, 3.6, 3.7, 3.8 (default 3.7)"
2828
echo -e " -h\t\t\t: help"
2929
echo -e " -v\t\t\t: display ${scriptname} version"
3030
}
@@ -40,8 +40,8 @@ while getopts ":p:hv" arg; do
4040
done
4141
shift $((OPTIND-1))
4242

43-
# default Python to 3.6 if not set by CLI params
44-
PYTHON_VER="${PYTHON_VER:-3.6}"
43+
# default Python to 3.7 if not set by CLI params
44+
PYTHON_VER="${PYTHON_VER:-3.7}"
4545

4646
CURRENT_DIR=$(reldir=$(dirname -- "0ドル"; echo x); reldir=${reldir%?x}; cd -- "$reldir" && pwd && echo x); CURRENT_DIR=${CURRENT_DIR%?x}
4747
BASE_DIR=$(basename $CURRENT_DIR)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /