Skip to content

Commit 2b8acaa

Browse files
Merge pull request #41 from developmentseed/develop
republish 1.0.0
2 parents a6b7383 + 151fa81 commit 2b8acaa

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

bin/lambda-package-base.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#!/bin/bash
22

33
# directory used for deployment
4-
DEPLOY_DIR=lambda
4+
export DEPLOY_DIR=lambda
5+
export PYVER=${1:-2.7}
56

6-
PYVER=${1:-2.7}
7-
8-
echo PYVER: $PYVER
7+
echo Creating deploy package for Python $PYVER
98

109
# make deployment directory and add lambda handler
1110
mkdir -p $DEPLOY_DIR/lib/python$PYVER/site-packages
@@ -22,15 +21,20 @@ cp $PREFIX/lib/libgeos_c.so.1 $DEPLOY_DIR/lib/
2221
cp $PREFIX/lib/libgeos-3.6.2.so $DEPLOY_DIR/lib/
2322
cp $PREFIX/lib/libnetcdf.so.13 $DEPLOY_DIR/lib/
2423
cp $PREFIX/lib/libopenjp2.so.7 $DEPLOY_DIR/lib/
25-
rsync -ax $PREFIX/lib/python$PYVER/site-packages/ $DEPLOY_DIR/lib/python$PYVER/site-packages/ \
24+
rsync -ax $PREFIX/lib/python$PYVER/site-packages/ $DEPLOY_DIR/ \
2625
--exclude-from $PREFIX/etc/lambda-excluded-packages
2726

2827
# copy 64-bit libs
2928
cp /usr/lib64/libjpeg.so.62 $DEPLOY_DIR/lib/
3029
#cp /usr/lib64/libpq.so.5 $DEPLOY_DIR/lib/
31-
rsync -ax $PREFIX/lib64/python$PYVER/site-packages/ $DEPLOY_DIR/lib/python$PYVER/site-packages/ \
30+
#rsync -ax $PREFIX/lib64/python$PYVER/site-packages/ $DEPLOY_DIR/lib/python$PYVER/site-packages/ \
31+
rsync -ax $PREFIX/lib64/python$PYVER/site-packages/ $DEPLOY_DIR/ \
3232
--exclude-from $PREFIX/etc/lambda-excluded-packages
3333

34+
# copy GDAL_DATA files over
35+
mkdir -p $DEPLOY_DIR/share
36+
rsync -ax $PREFIX/share/gdal share/
37+
3438
# zip up deploy package
3539
cd $DEPLOY_DIR
3640
zip -ruq ../lambda-deploy.zip ./

etc/lambda-excluded-packages

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ setuptools*
77
wheel*
88
coverage*
99
testfixtures*
10-
pytest*
1110
mock*
1211
GDAL-*
12+
*.egg-info
13+
*.dist-info

geolambda-seed/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ FROM developmentseed/geolambda:latest
88
# pip install . -v; \
99
# rm -rf /build/*;
1010

11+
COPY lambda/lambda-package.sh /usr/local/bin/
12+
1113
WORKDIR /home/geolambda

0 commit comments

Comments
 (0)