This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
forked from Miserlou/lambda-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Miserlou#18 from Winter-Guerra/master
Added compiled package `regex` to library
- Loading branch information
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
##Notes | ||
|
||
This package is required for use of the package [flanker](https://github.com/mailgun/flanker) (an email parsing library) in the lambda execution environment. | ||
|
||
##Build | ||
|
||
`./build.sh regex 2016.8.27` | ||
|
||
|
||
## AWS Lambda execution environment | ||
Built on **ami-6869aa05**, US East (N. Virginia), us-east-1. | ||
|
||
See [official docs](http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html) for more details about supported version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
set -o pipefail | ||
|
||
prefix="pillow-build" | ||
bucket="<YOUR BUCKET>" | ||
region="<YOUR REGION>" | ||
|
||
echo "do update" | ||
yum update -y | ||
|
||
echo "do dependcy install" | ||
yum install -y \ | ||
gcc \ | ||
libtiff-devel \ | ||
libzip-devel \ | ||
libjpeg-devel \ | ||
freetype-devel \ | ||
lcms2-devel \ | ||
libwebp-devel \ | ||
tcl-devel \ | ||
tk-devel | ||
|
||
echo "copy webp deps" | ||
cd /usr/lib64/ | ||
find . -name "*webp*" | cpio -pdm ~/env/lib64/python2.7/site-packages/ | ||
cd ~/ | ||
chmod 755 -R env/lib64/python2.7/site-packages/ | ||
|
||
echo "make env" | ||
/usr/bin/virtualenv \ | ||
--python /usr/bin/python env \ | ||
--always-copy | ||
|
||
|
||
|
||
echo "activate env in `pwd`" | ||
source env/bin/activate | ||
|
||
echo "install pips" | ||
pip install --verbose --use-wheel pillow | ||
deactivate | ||
|
||
echo "tar lib and lib64" | ||
mkdir Pillow-3.1.1 | ||
cp -a env/lib/python2.7/site-packages/. Pillow-3.1.1/ | ||
cp -a env/lib64/python2.7/site-packages/. Pillow-3.1.1/ | ||
cd Pillow-3.1.1/ && tar -zcvf ../Pillow-3.1.1.tar.gz * && cd .. | ||
|
||
#make lambda test | ||
cd Pillow-3.1.1/ | ||
wget https://raw.githubusercontent.com/Miserlou/lambda-packages/master/lambda_packages/Pillow/test/test.jpg | ||
wget https://raw.githubusercontent.com/Miserlou/lambda-packages/master/lambda_packages/Pillow/test/test.py | ||
zip -r9 ../test.zip * && cd .. | ||
|
||
if [ "$bucket" != "<YOUR BUCKET>" ] && [ "$region" != "<YOUR REGION>" ] | ||
then | ||
echo "uploading to $bucket in $region" | ||
aws s3 cp test.zip s3://$bucket/$dir/test.zip --region $region | ||
aws s3 cp Pillow-3.1.1.tar.gz s3://$bucket/$dir/Pillow-3.1.1.tar.gz --region $region | ||
fi |
Binary file not shown.