Staffjoy / suite

Staffjoy V1, aka "Suite" - a scheduling application for hundreds of workers
https://www.staffjoy.com
Other
844 stars 232 forks source link

Unable to build Dockerfile or Docker-compose #48

Open annts opened 6 years ago

annts commented 6 years ago

Hi,

I am trying to get the staffjoy v1 suite-master using Docker-compose and I am running into the following error message. Building the dockerfile also throws up a similar error. It looks like it is unable to install the cryptography package. Any thoughts or suggestions will be greatly appreciated.

Running setup.py (path:/tmp/pip_build_root/pycparser/setup.py) egg_info for package pycparser

warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'

Downloading/unpacking pylint==1.5.5 (from -r requirements.txt (line 51)) Downloading/unpacking pylint-flask==0.3 (from -r requirements.txt (line 52)) Downloading pylint-flask-0.3.tar.gz Running setup.py (path:/tmp/pip_build_root/pylint-flask/setup.py) egg_info for package pylint-flask

Downloading/unpacking pylint-plugin-utils==0.2.3 (from -r requirements.txt (line 53)) Downloading pylint-plugin-utils-0.2.3.tar.gz Running setup.py (path:/tmp/pip_build_root/pylint-plugin-utils/setup.py) egg_info for package pylint-plugin-utils

Downloading/unpacking PyMySQL==0.7.2 (from -r requirements.txt (line 54)) Downloading/unpacking pyOpenSSL==0.15.1 (from -r requirements.txt (line 55)) Downloading/unpacking pyparsing==2.1.10 (from -r requirements.txt (line 56)) Downloading/unpacking pytest==2.9.1 (from -r requirements.txt (line 57)) Downloading/unpacking python-dateutil==2.4.2 (from -r requirements.txt (line 58)) Downloading/unpacking python-editor==0.5 (from -r requirements.txt (line 59)) Downloading python-editor-0.5.tar.gz Running setup.py (path:/tmp/pip_build_root/python-editor/setup.py) egg_info for package python-editor

Downloading/unpacking pytz==2015.7 (from -r requirements.txt (line 60)) Downloading/unpacking redis==2.10.5 (from -r requirements.txt (line 61)) Downloading/unpacking requests==2.9.1 (from -r requirements.txt (line 62)) Downloading/unpacking six==1.10.0 (from -r requirements.txt (line 63)) Downloading six-1.10.0-py2.py3-none-any.whl Downloading/unpacking SQLAlchemy==1.0.12 (from -r requirements.txt (line 64)) Running setup.py (path:/tmp/pip_build_root/SQLAlchemy/setup.py) egg_info for package SQLAlchemy

warning: no files found matching '*.jpg' under directory 'doc'
warning: no files found matching '*.mako' under directory 'doc'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching 'sa2to3.py'
warning: no files found matching 'ez_setup.py'
no previously-included directories found matching 'doc/build/output'

Downloading/unpacking stripe==1.29.1 (from -r requirements.txt (line 65)) Running setup.py (path:/tmp/pip_build_root/stripe/setup.py) egg_info for package stripe

Downloading/unpacking twilio==5.4.0 (from -r requirements.txt (line 66)) Running setup.py (path:/tmp/pip_build_root/twilio/setup.py) egg_info for package twilio

Downloading/unpacking Unirest==1.1.7 (from -r requirements.txt (line 67)) Downloading Unirest-1.1.7.tar.gz Running setup.py (path:/tmp/pip_build_root/Unirest/setup.py) egg_info for package Unirest

warning: no files found matching '*.txt' under directory 'docs'

Downloading/unpacking visitor==0.1.2 (from -r requirements.txt (line 68)) Downloading visitor-0.1.2.tar.gz Running setup.py (path:/tmp/pip_build_root/visitor/setup.py) egg_info for package visitor

Downloading/unpacking webassets==0.11.1 (from -r requirements.txt (line 69)) Running setup.py (path:/tmp/pip_build_root/webassets/setup.py) egg_info for package webassets

warning: no files found matching 'run_tests.py'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching 'out.css' found under directory 'examples'
warning: no previously-included files matching 'out.js' found under directory 'examples'
no previously-included directories found matching 'examples/appengine-sdk'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.gitignore' found anywhere in distribution
warning: no previously-included files matching '*.orig' found anywhere in distribution
warning: no previously-included files matching 'webassets-cache/*' found anywhere in distribution
warning: no previously-included files matching '.sass-cache/*' found anywhere in distribution

Downloading/unpacking Werkzeug==0.11.4 (from -r requirements.txt (line 70)) Downloading/unpacking wrapt==1.10.8 (from -r requirements.txt (line 71)) Downloading wrapt-1.10.8.tar.gz Running setup.py (path:/tmp/pip_build_root/wrapt/setup.py) egg_info for package wrapt

Downloading/unpacking WTForms==2.1 (from -r requirements.txt (line 72)) Running setup.py (path:/tmp/pip_build_root/WTForms/setup.py) egg_info for package WTForms

warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: no previously-included files matching '*.pyc' found under directory 'tests'

Downloading/unpacking yapf==0.16.0 (from -r requirements.txt (line 73)) Requirement already satisfied (use --upgrade to upgrade): setuptools>=1.0 in /usr/lib/python2.7/dist-packages (from cryptography==1.2.2->-r requirements.txt (line 12)) Installing collected packages: alembic, amqp, aniso8601, anyjson, appdirs, astroid, billiard, blinker, celery, cffi, colorama, cryptography, docopt, dominate, enum34, Flask, Flask-Assets, Flask-Bootstrap, Flask-Limiter, Flask-Login, Flask-Mail, Flask-Migrate, Flask-Redis-Helper, Flask-RESTful, Flask-Script, Flask-SQLAlchemy, Flask-WTF, httplib2, idna, ipaddress, iso8601, itsdangerous, Jinja2, jsmin, kombu, lazy-object-proxy, limits, logilab-common, Mako, mandrill, Markdown, MarkupSafe, MySQL-python, ndg-httpsclient, packaging, phonenumbers, poster, py, pyasn1, pycparser, pylint, pylint-flask, pylint-plugin-utils, PyMySQL, pyOpenSSL, pyparsing, pytest, python-dateutil, python-editor, pytz, redis, requests, six, SQLAlchemy, stripe, twilio, Unirest, visitor, webassets, Werkzeug, wrapt, WTForms, yapf Running setup.py install for alembic

warning: no files found matching '*.jpg' under directory 'docs'
warning: no files found matching '*.sty' under directory 'docs'
warning: no files found matching '*.dat' under directory 'tests'
no previously-included directories found matching 'docs/build/output'
Installing alembic script to /usr/local/bin

Running setup.py install for aniso8601

Running setup.py install for anyjson

Compiling /tmp/pip_build_root/astroid/astroid/tests/testdata/python3/data/module2.py ... File "/tmp/pip_build_root/astroid/astroid/tests/testdata/python3/data/module2.py", line 100 print('bonjour', file=stream) ^ SyntaxError: invalid syntax

Running setup.py install for billiard building '_billiard' extension x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_billiard -I/usr/include/python2.7 -c Modules/_billiard/multiprocessing.c -o build/temp.linux-x86_64-2.7/Modules/_billiard/multiprocessing.o x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_billiard -I/usr/include/python2.7 -c Modules/_billiard/socket_connection.c -o build/temp.linux-x86_64-2.7/Modules/_billiard/socket_connection.o x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_billiard -I/usr/include/python2.7 -c Modules/_billiard/semaphore.c -o build/temp.linux-x86_64-2.7/Modules/_billiard/semaphore.o x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/Modules/_billiard/multiprocessing.o build/temp.linux-x86_64-2.7/Modules/_billiard/socket_connection.o build/temp.linux-x86_64-2.7/Modules/_billiard/semaphore.o -lrt -o build/lib.linux-x86_64-2.7/_billiard.so

warning: no files found matching '*.py' under directory 'Lib'

Running setup.py install for blinker

Running setup.py install for cffi building '_cffi_backend' extension x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/c/_cffi_backend.o -lffi -o build/lib.linux-x86_64-2.7/_cffi_backend.so

Found existing installation: colorama 0.2.5 Not uninstalling colorama at /usr/lib/python2.7/dist-packages, owned by OS Running setup.py install for cryptography warning: no previously-included files matching 'yacctab.' found under directory 'tests' warning: no previously-included files matching 'lextab.' found under directory 'tests' warning: no previously-included files matching 'yacctab.' found under directory 'examples' warning: no previously-included files matching 'lextab.' found under directory 'examples' zip_safe flag not set; analyzing archive contents... pycparser.ply.ygen: module references file pycparser.ply.yacc: module references file pycparser.ply.yacc: module MAY be using inspect.getsourcefile pycparser.ply.yacc: module MAY be using inspect.stack pycparser.ply.lex: module references file pycparser.ply.lex: module MAY be using inspect.getsourcefile

Installed /tmp/pip_build_root/cryptography/pycparser-2.18-py2.7.egg
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip_build_root/cryptography/setup.py", line 318, in <module>
    **keywords_with_side_effects(sys.argv)
  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 243, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 277, in finalize_options
    ep.load()(self, ep.name, value)
  File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 161, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 48, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 24, in execfile
    exec(code, glob, glob)
  File "src/_cffi_src/build_openssl.py", line 98, in <module>
    extra_link_args=extra_link_args(compiler_type()),
  File "/tmp/pip_build_root/cryptography/src/_cffi_src/utils.py", line 64, in build_ffi_for_binding
    extra_link_args=extra_link_args,
  File "/tmp/pip_build_root/cryptography/src/_cffi_src/utils.py", line 73, in build_ffi
    ffi.cdef(cdef_source)
  File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 105, in cdef
    self._cdef(csource, override=override, packed=packed)
  File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 119, in _cdef
    self._parser.parse(csource, override=override, **options)
  File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 289, in parse
    self._internal_parse(csource)
  File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 294, in _internal_parse
    ast, macros, csource = self._parse(csource)
  File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 252, in _parse
    self.convert_pycparser_error(e, csource)
  File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 281, in convert_pycparser_error
    raise api.CDefError(msg)
cffi.api.CDefError: cannot parse "typedef int __dotdotdot__  time_t;"
:13:28: before: time_t
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-JIFOMk-record/install-record.txt --single-version-externally-managed --compile:
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'

warning: no previously-included files matching 'lextab.*' found under directory 'tests'

warning: no previously-included files matching 'yacctab.*' found under directory 'examples'

warning: no previously-included files matching 'lextab.*' found under directory 'examples'

zip_safe flag not set; analyzing archive contents...

pycparser.ply.ygen: module references file

pycparser.ply.yacc: module references file

pycparser.ply.yacc: module MAY be using inspect.getsourcefile

pycparser.ply.yacc: module MAY be using inspect.stack

pycparser.ply.lex: module references file

pycparser.ply.lex: module MAY be using inspect.getsourcefile

Installed /tmp/pip_build_root/cryptography/pycparser-2.18-py2.7.egg

Traceback (most recent call last):

File "", line 1, in

File "/tmp/pip_build_root/cryptography/setup.py", line 318, in

**keywords_with_side_effects(sys.argv)

File "/usr/lib/python2.7/distutils/core.py", line 111, in setup

_setup_distribution = dist = klass(attrs)

File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 243, in init

_Distribution.__init__(self,attrs)

File "/usr/lib/python2.7/distutils/dist.py", line 287, in init

self.finalize_options()

File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 277, in finalize_options

ep.load()(self, ep.name, value)

File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 161, in cffi_modules

add_cffi_module(dist, cffi_module)

File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 48, in add_cffi_module

execfile(build_file_name, mod_vars)

File "/usr/local/lib/python2.7/dist-packages/cffi/setuptools_ext.py", line 24, in execfile

exec(code, glob, glob)

File "src/_cffi_src/build_openssl.py", line 98, in

extra_link_args=extra_link_args(compiler_type()),

File "/tmp/pip_build_root/cryptography/src/_cffi_src/utils.py", line 64, in build_ffi_for_binding

extra_link_args=extra_link_args,

File "/tmp/pip_build_root/cryptography/src/_cffi_src/utils.py", line 73, in build_ffi

ffi.cdef(cdef_source)

File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 105, in cdef

self._cdef(csource, override=override, packed=packed)

File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 119, in _cdef

self._parser.parse(csource, override=override, **options)

File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 289, in parse

self._internal_parse(csource)

File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 294, in _internal_parse

ast, macros, csource = self._parse(csource)

File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 252, in _parse

self.convert_pycparser_error(e, csource)

File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 281, in convert_pycparser_error

raise api.CDefError(msg)

cffi.api.CDefError: cannot parse "typedef int dotdotdot time_t;"

:13:28: before: time_t


Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-JIFOMk-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/cryptography Storing debug log for failure in /root/.pip/pip.log ERROR: Service 'website' failed to build: The command '/bin/sh -c cd /src; pip install -r requirements.txt' returned a non-zero code: 1

yehancha commented 4 years ago

I could fix this issue by changing some lines in Dockerfile.

All these changes are in this commit: https://github.com/yehancha/suite/commit/5c60d9cb4ebbbffab228dc0ad85990944fd5413a