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

Popular cryptography library PyNaCl doesn't install. #142

Closed
fletom opened this issue May 22, 2014 · 3 comments
Closed

Popular cryptography library PyNaCl doesn't install. #142

fletom opened this issue May 22, 2014 · 3 comments

Comments

@fletom
Copy link

fletom commented May 22, 2014

If you add the package PyNaCl to your requirements and push to Heroku, the build fails.

distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1
@fletom
Copy link
Author

fletom commented Jul 14, 2014

It turns out this isn't a problem with heroku-buildpack-python, but rather with PyNaCl itself.

I managed to get it working using a combination of two different Heroku buildpacks using heroku-buildpack-multi:

git://github.com/fletom/heroku-buildpack-python-libffi.git
git://github.com/fletom/heroku-buildpack-libsodium.git

This gets around the issue by installing a system-wide copy of libsodium, but the original bug is still there and currently has an active ticket on PyNaCl's issue tracker: pyca/pynacl#79

@fletom fletom closed this as completed Jul 14, 2014
@lincolnq
Copy link

If anyone is Googling and hitting this problem as of now, the solution is to add both PyNaCl and cffi to your requirements file -- you don't need any buildpack hackery anymore. Heroku's default Python buildpack knows how to install libffi but only if cffi is explicitly mentioned! (https://coderanger.net/heroku-cffi/)

@edmorley
Copy link
Member

I've opened #296 to avoid the need for explicitly including cffi in the requirements file.

That said IMO people should really start pinning all deps as a matter of default, particularly given the benefits of pip v8's new require-hashes mode. For a not-too-painful workflow, see the suggestions in http://www.kennethreitz.org/essays/a-better-pip-workflow

gaumire referenced this issue in gaumire/heroku-buildpack-python Jun 23, 2016
To reduce confusion for users who have not explicitly listed cffi as a
dependency.

Fixes #142.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants