-
Notifications
You must be signed in to change notification settings - Fork 149
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
Heroku builds fail due to absence of libffi #90
Comments
Thank you for filing. It's best practice to add all requirements to your requirements file for deployments, and Heroku's setup is pretty unique (and support can be added to it fairly easily, see below), so I wonder if it may be out of scope for the WhiteNoise docs to mention the need to add cffi to requirements.txt? Adding automatic support to Heroku is a case of adding I was about to add it myself, but I wonder if it's best to wait for the official brotli PyPI package? (brotlipy is a stop-gap pending google/brotli#72). Guess we could add brotlipy now and tweak later? |
So another thing that would be good, is if the Heroku buildpack output a more helpful error message (like they already do for missing libmemcached for pylibmc for example). I'm happy to open a PR against the buildpack to do that - however it would help to know how you got this output...?
Since when I try to install brotlipy locally without libffi installed I instead get:
Different version of pip/setuptools/Python perhaps? I just want to make sure the warning handling I add to the buildpack greps for the correct error strings in the pip output -- there may be several variations, but would be good to know why. |
@JonHannah Yeah, I've realised that my docs aren't helpful here because I talk about adding I guess that's what most users are doing anyway, but my docs are misleading in this regard. @edmorley It's a shame the offical package still hasn't made it to PyPI. It all looks ready to go; I wonder what the hold up is? |
I encountered this on upgrading to whitenoise 3.2 and adding brotlipy per the documented recommendation.
remote: -----> Using set buildpack heroku/python
remote: -----> Python app detected
remote: $ pip install -r requirements.txt
remote: Collecting brotlipy==0.3.0 (from -r requirements.txt (line 1))
remote: Downloading brotlipy-0.3.0.tar.gz (492kB)
remote: Complete output from command python setup.py egg_info:
remote: Package libffi was not found in the pkg-config search path.
remote: Perhaps you should add the directory containing `libffi.pc'
remote: to the PKG_CONFIG_PATH environment variable
remote: No package 'libffi' found
Adding cffi to requirements.txt was an easy fix, but would be good to add some acknowledgment to the whitenoise docs (until such time as Heroku 'notices' brotlipy!).
remote: -----> Using set buildpack heroku/python
remote: -----> Python app detected
remote: -----> _Noticed cffi. Bootstrapping libffi._
remote: $ pip install -r requirements.txt
remote: Collecting brotlipy==0.3.0 (from -r requirements.txt (line 1))
remote: Downloading brotlipy-0.3.0.tar.gz (492kB)
remote: Collecting cffi==1.2.1 (from -r requirements.txt (line 2))
remote: Downloading cffi-1.2.1.tar.gz (335kB) ...
The text was updated successfully, but these errors were encountered: