0

Have researched this and came across Problems with custom LIBFFI Heroku buildpack, where they suggest a forked libffi buildpack.

But even after following the directions there, can't seem to get it to compile properly. It fails with a number of No package 'libffi' found messages (full log below).

How can I get libffi compiled properly for a Heroku Python application?

requirements.txt file:

Flask==0.10.1
gunicorn==18.0
cryptography==0.3

Buildpack environment variable:

BUILDPACK_URL:                 git://github.com/mfenniak/heroku-buildpack-python-libffi.git

git push errors:

https://gist.github.com/HanSooloo/8a9290c032ed603f6cf4#file-libffi-errors

UPDATE

Feeling very silly as I have clearly done a bad Copy/Paste in setting the BUILDPACK_URL environment variable in Heroku.

The forked buildpack at h++ps://github.com/kennethjiang/heroku-buildpack-python-libffi has the same Readme.md file as the original one at h++ps://github.com/mfenniak/heroku-buildpack-python-libffi.

Which means, if I simply copy/paste the instructions from 'kennethjiang's repo, I will actually be pointing to 'mfenniak's original repo:

kennethjiang's Readme.md:

$ heroku config:add BUILDPACK_URL=git://github.com/mfenniak/heroku-buildpack-python-libffi.git

Should have done:

$ heroku config:add BUILDPACK_URL=git://github.com/kennethjiang/heroku-buildpack-python-libffi.git
4

2 回答 2

2

目前不再需要更改 BUILDPACK_URL。

只需在 requirements.txt 中添加 cffi 或密码学,libffi 就会自动引导。

于 2016-05-19T00:39:37.510 回答
1

感觉很傻,因为我在 Heroku 中设置 BUILDPACK_URL 环境变量时显然做了一个糟糕的复制/粘贴。

https://github.com/kennethjiang/heroku-buildpack-python-libffi的分叉 buildpack 与https://github.com/mfenniak/heroku-buildpack-python-libffiReadme.md的原始文件具有相同的文件。

这意味着,如果我只是复制/粘贴 'kennethjiang's repo 中的说明,我实际上将指向 'mfenniak's original repo:

kennethjiang 的 Readme.md:

$ heroku config:add BUILDPACK_URL=git://github.com/mfenniak/heroku-buildpack-python-libffi.git

应该已经完成​​:

$ heroku config:add BUILDPACK_URL=git://github.com/kennethjiang/heroku-buildpack-python-libffi.git
于 2014-05-15T12:59:01.710 回答