Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sasl python3.6 #77

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Currently includes (at least Python 2.7) support for:
* regex
* SQLite
* xmlsec
* sasl

This project is intended for use by [Zappa](https://github.com/Miserlou/Zappa), but could also be used by any Python/Lambda project.

Expand Down Expand Up @@ -57,6 +58,25 @@ print lambda_packages['psycopg2']
#}
```

## SASL library

If PyHive (https://github.com/dropbox/PyHive) package is used (or any other library that uses sasl package) in lambda deployed with Zappa it will fail since PyHive uses C++ libraries which must be compiled with proper CXX flags. To help with this lambda_packages includes Sasl package compiled on AWS EC2 machine for Python 3.6 which includes all needed C++ dependencies.
Additional libs are:

- libanonymous.so.2.0.23
- libcrammd5.so.2.0.23
- libdigestmd5.so.2.0.23
- libgssapiv2.so.2.0.23
- liblogin.so.2.0.23
- libplain.so.2.0.23
- libsasldb.so.2.0.23

All are placed in `./lib` folder and to use them your lambda should set `SASL_PATH` env variable like so:

```
os.environ['SASL_PATH'] = os.path.join(os.getcwd(), 'lib')
```

## Contributing

To add support for more packages, send a pull request containing a gzipped tarball (`tar -zcvf <package-name>.tar.gz <list-of-files>`) of the package (built on Amazon Linux and tested on AWS Lambda) in the appropriate directory, an updated manifest, and deterministic build instructions for creating the archive.
Expand Down
6 changes: 6 additions & 0 deletions lambda_packages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,11 @@
'version': '1.0.9',
'path': os.path.join(PACKAGES_DIR, 'xmlsec', 'python3.6-xmlsec-1.0.9.tar.gz')
}
},
'sasl': {
'python3.6': {
'version': '0.2.1',
'path': os.path.join(PACKAGES_DIR, 'sasl', 'python3.6-sasl-0.2.1.tar.gz')
}
}
}
Binary file added lambda_packages/sasl/python3.6-sasl-0.2.1.tar.gz
Binary file not shown.