bot
bot copied to clipboard
Setup jsdelvr-bot for testing proposes on Heroku?
How can I setup the jsdelvr-bot for testing proposes on Heroku?
I get this following warning:
-----> Python app detected
-----> Installing python-2.7.11
$ pip install -r requirements.txt
Collecting PyYAML>=3 (from -r requirements.txt (line 1))
Downloading PyYAML-3.11.zip (371kB)
Collecting Twisted==13.1.0 (from -r requirements.txt (line 2))
Downloading Twisted-13.1.0.tar.bz2 (2.7MB)
Collecting async==0.6.1 (from -r requirements.txt (line 3))
Downloading async-0.6.1.tar.gz
Collecting blinker==1.3 (from -r requirements.txt (line 4))
Downloading blinker-1.3.tar.gz (91kB)
Collecting github3.py==0.9.3 (from -r requirements.txt (line 5))
Downloading github3.py-0.9.3-py2.py3-none-any.whl (104kB)
Collecting pystache==0.5 (from -r requirements.txt (line 6))
Downloading pystache-0.5.0.tar.gz
Collecting requests>=2.2 (from -r requirements.txt (line 7))
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
Collecting semantic-version==2.3 (from -r requirements.txt (line 8))
Downloading semantic_version-2.3.0.tar.gz
Collecting pyopenssl>=0.15.1 (from -r requirements.txt (line 9))
Downloading pyOpenSSL-16.0.0-py2.py3-none-any.whl (45kB)
Collecting ndg-httpsclient>=0.4.0 (from -r requirements.txt (line 10))
Downloading ndg_httpsclient-0.4.0.tar.gz
Collecting pyasn1>=0.1.9 (from -r requirements.txt (line 11))
Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Collecting zope.interface>=3.6.0 (from Twisted==13.1.0->-r requirements.txt (line 2))
Downloading zope.interface-4.1.3.tar.gz (141kB)
Collecting uritemplate.py>=0.2.0 (from github3.py==0.9.3->-r requirements.txt (line 5))
Downloading uritemplate.py-0.3.0.tar.gz
Collecting cryptography>=1.3 (from pyopenssl>=0.15.1->-r requirements.txt (line 9))
Downloading cryptography-1.4.tar.gz (399kB)
Collecting six>=1.5.2 (from pyopenssl>=0.15.1->-r requirements.txt (line 9))
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting idna>=2.0 (from cryptography>=1.3->pyopenssl>=0.15.1->-r requirements.txt (line 9))
Downloading idna-2.1-py2.py3-none-any.whl (54kB)
Collecting enum34 (from cryptography>=1.3->pyopenssl>=0.15.1->-r requirements.txt (line 9))
Downloading enum34-1.1.6-py2-none-any.whl
Collecting ipaddress (from cryptography>=1.3->pyopenssl>=0.15.1->-r requirements.txt (line 9))
Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting cffi>=1.4.1 (from cryptography>=1.3->pyopenssl>=0.15.1->-r requirements.txt (line 9))
Downloading cffi-1.6.0.tar.gz (397kB)
Collecting pycparser (from cffi>=1.4.1->cryptography>=1.3->pyopenssl>=0.15.1->-r requirements.txt (line 9))
Downloading pycparser-2.14.tar.gz (223kB)
Installing collected packages: PyYAML, zope.interface, Twisted, async, blinker, requests, uritemplate.py, github3.py, pystache, semantic-version, idna, pyasn1, six, enum34, ipaddress, pycparser, cffi, cryptography, pyopenssl, ndg-httpsclient
Running setup.py install for PyYAML: started
Running setup.py install for PyYAML: finished with status 'done'
Running setup.py install for zope.interface: started
Running setup.py install for zope.interface: finished with status 'done'
Running setup.py install for Twisted: started
Running setup.py install for Twisted: finished with status 'done'
Running setup.py install for async: started
Running setup.py install for async: finished with status 'done'
Running setup.py install for blinker: started
Running setup.py install for blinker: finished with status 'done'
Running setup.py install for uritemplate.py: started
Running setup.py install for uritemplate.py: finished with status 'done'
Running setup.py install for pystache: started
Running setup.py install for pystache: finished with status 'done'
Running setup.py install for semantic-version: started
Running setup.py install for semantic-version: finished with status 'done'
Running setup.py install for pycparser: started
Running setup.py install for pycparser: finished with status 'done'
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-eFKfun/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ZFAHUC-record/install-record.txt --single-version-externally-managed --compile:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/gc_weakref.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/model.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/api.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-2.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-2.7/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-2.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/c
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/app/.heroku/python/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-eFKfun/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ZFAHUC-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-eFKfun/cffi/
! Push rejected, failed to compile Python app
Create .env file and get this output:
C:\Users\Suriyaa\Downloads\bot>heroku local
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[OKAY] Trimming display Output to 149 Columns
14:37:31 web.1 | Traceback (most recent call last):
14:37:31 web.1 | File "run.py", line 8, in <module>
14:37:31 web.1 | jimaek = validator.PullBot()
14:37:31 web.1 | File "C:\Users\Suriyaa\Downloads\bot\validator.py", line 18, in __init__
14:37:31 web.1 | self.repo = self.gh.repository(self.config["owner"], self.config["repo"])
14:37:31 web.1 | File "C:\Python27\lib\site-packages\github3\github.py", line 1063, in repository
14:37:31 web.1 | json = self._json(self._get(url), 200)
14:37:31 web.1 | File "C:\Python27\lib\site-packages\github3\models.py", line 100, in _json
14:37:31 web.1 | if self._boolean(response, status_code, 404) and response.content:
14:37:31 web.1 | File "C:\Python27\lib\site-packages\github3\models.py", line 121, in _boolean
14:37:32 web.1 | raise GitHubError(response)
14:37:32 web.1 | github3.models.GitHubError: 401 Bad credentials
[DONE] Killing all processes with signal null
14:37:32 web.1 Exited Abnormally
github3.models.GitHubError: 401 Bad credentials
Is your auth token set correctly for the given user name?
@megawac
Well, publishing the project worked:
-----> Using set buildpack heroku/python
-----> Python app detected
-----> Noticed cffi. Bootstrapping libffi.
$ pip install -r requirements.txt
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 46.3M
-----> Launching...
Released v25
https://datacdn-bot.herokuapp.com/ deployed to Heroku
I selected the repo
and admin:repo_hook
scopes for the bot:
But it doesn't worked!
A Heroku Application Error: https://datacdn-bot.herokuapp.com/