diff --git a/README.md b/README.md index 99961a8..5000c6e 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 .tar.gz `) 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. diff --git a/lambda_packages/__init__.py b/lambda_packages/__init__.py index 8fb4c3c..1232b08 100644 --- a/lambda_packages/__init__.py +++ b/lambda_packages/__init__.py @@ -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') + } } } diff --git a/lambda_packages/sasl/python3.6-sasl-0.2.1.tar.gz b/lambda_packages/sasl/python3.6-sasl-0.2.1.tar.gz new file mode 100644 index 0000000..ae5b419 Binary files /dev/null and b/lambda_packages/sasl/python3.6-sasl-0.2.1.tar.gz differ