Skip to content

Commit

Permalink
fix(packaging): move python packages to zip root
Browse files Browse the repository at this point in the history
  • Loading branch information
tnguyen1 committed Feb 8, 2021
1 parent d3d4fff commit aff2ebe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions awscli-lambda-package_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export ZIP_FILE_NAME="awscli-lambda-layer.zip"
mkdir ${VIRTUAL_ENV_DIR}

# Initializes a virtual environment in the virtual environment directory
virtualenv ${VIRTUAL_ENV_DIR}
virtualenv -p python3 ${VIRTUAL_ENV_DIR}

# Changes current dir to the virtual env directory
cd ${VIRTUAL_ENV_DIR}/bin/
Expand Down Expand Up @@ -46,7 +46,7 @@ cd ${LAMBDA_LAYER_DIR}

# Copies aws and its dependencies to the temp directory
cp ../${VIRTUAL_ENV_DIR}/bin/aws .
cp -r ../${VIRTUAL_ENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/ .
cp -r ../${VIRTUAL_ENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/* .

# Zips the contents of the temporary directory
zip -r ../${ZIP_FILE_NAME} *
Expand All @@ -56,4 +56,4 @@ cd ..

# Removes virtual env and temp directories
rm -r ${VIRTUAL_ENV_DIR}
rm -r ${LAMBDA_LAYER_DIR}
rm -r ${LAMBDA_LAYER_DIR}
4 changes: 2 additions & 2 deletions awscli-lambda-package_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export ZIP_FILE_NAME="awscli-lambda-layer.zip"
mkdir ${VIRTUAL_ENV_DIR}

# Initializes a virtual environment in the virtual environment directory
virtualenv ${VIRTUAL_ENV_DIR}
virtualenv -p python3 ${VIRTUAL_ENV_DIR}

# Changes current dir to the virtual env directory
cd ${VIRTUAL_ENV_DIR}/bin/
Expand Down Expand Up @@ -46,7 +46,7 @@ cd ${LAMBDA_LAYER_DIR}

# Copies aws and its dependencies to the temp directory
cp ../${VIRTUAL_ENV_DIR}/bin/aws .
cp -r ../${VIRTUAL_ENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/ .
cp -r ../${VIRTUAL_ENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/* .

# Zips the contents of the temporary directory
zip -r ../${ZIP_FILE_NAME} *
Expand Down

0 comments on commit aff2ebe

Please sign in to comment.