2012-05-09 132 views
5

看来Heroku不支持python-ldap。画中画与在requirements.txt文件“中的python-LDAP == 2.3.13”安装失败,在Heroku的以下错误:python-ldap未能在Heroku中安装

gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.13 -IModules -I/usr/local/openldap-2.3/include -I/usr/include/sasl -I/usr/local/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o

Modules/LDAPObject.c:18:18: error: sasl.h: No such file or directory

它看起来像Heroku的不具有蟒蛇,LDAP和我所需要的库不知道是否有方法安装依赖库,除了'pip'。

在Heroku的Python/Django堆栈中支持ldap认证的推荐解决方案是什么?

非常感谢您的帮助。

回答

1

我最近创建了heroku buildpack,支持python-ldap。这是可用my github repo

为了使它工作,你只需要指定这样的环境变量:这里

heroku config:set BUILDPACK_URL=https://github.com/damgad/heroku-buildpack-python-ldap.git