diff --git a/extras/build_web2py/web2py.mac.spec b/extras/build_web2py/web2py.mac.spec index 1a1894b0..c6f2a73e 100644 --- a/extras/build_web2py/web2py.mac.spec +++ b/extras/build_web2py/web2py.mac.spec @@ -7,7 +7,7 @@ a = Analysis(['web2py.py'], pathex=['.'], binaries=[('/System/Library/Frameworks/Tk.framework/Tk', 'tk'), ('/System/Library/Frameworks/Tcl.framework/Tcl', 'tcl')], datas=[], - hiddenimports=['site-packages', 'cgi', 'cgitb', 'code', 'concurrent', 'concurrent.futures', + hiddenimports=['site-packages', 'argparse', 'cgi', 'cgitb', 'code', 'concurrent', 'concurrent.futures', 'concurrent.futures._base', 'concurrent.futures.process', 'concurrent.futures.thread', 'configparser', 'cProfile', 'csv', 'ctypes.wintypes', 'email.mime', 'email.mime.base', 'email.mime.multipart', 'email.mime.nonmultipart', 'email.mime.text', 'html.parser', 'http.cookies', 'ipaddress', 'imaplib', 'imp', 'json', 'json.decoder', 'json.encoder', 'json.scanner', 'logging.config', 'logging.handlers', 'profile', 'pstats', diff --git a/extras/build_web2py/web2py.win.spec b/extras/build_web2py/web2py.win.spec index 6dce1ebf..d2d0e182 100644 --- a/extras/build_web2py/web2py.win.spec +++ b/extras/build_web2py/web2py.win.spec @@ -7,7 +7,7 @@ a = Analysis(['web2py.py'], pathex=['.'], binaries=[], datas=[], - hiddenimports=['site-packages', 'cgi', 'cgitb', 'code', 'concurrent', 'concurrent.futures', + hiddenimports=['site-packages', 'argparse', 'cgi', 'cgitb', 'code', 'concurrent', 'concurrent.futures', 'concurrent.futures._base', 'concurrent.futures.process', 'concurrent.futures.thread', 'configparser', 'csv', 'ctypes.wintypes', 'email.mime', 'email.mime.base', 'email.mime.multipart', 'email.mime.nonmultipart', 'email.mime.text', 'html.parser', 'http.cookies', 'ipaddress', 'imp', 'json', 'json.decoder', 'json.encoder', 'json.scanner', 'logging.config', 'logging.handlers', 'profile', 'pstats', diff --git a/extras/build_web2py/web2py.win_no_console.spec b/extras/build_web2py/web2py.win_no_console.spec index 75932924..10b59e6a 100644 --- a/extras/build_web2py/web2py.win_no_console.spec +++ b/extras/build_web2py/web2py.win_no_console.spec @@ -7,7 +7,7 @@ a = Analysis(['web2py.py'], pathex=['.'], binaries=[], datas=[], - hiddenimports=['site-packages', 'cgi', 'cgitb', 'code', 'concurrent', 'concurrent.futures', + hiddenimports=['site-packages', 'argparse', 'cgi', 'cgitb', 'code', 'concurrent', 'concurrent.futures', 'concurrent.futures._base', 'concurrent.futures.process', 'concurrent.futures.thread', 'configparser', 'csv', 'ctypes.wintypes', 'email.mime', 'email.mime.base', 'email.mime.multipart', 'email.mime.nonmultipart', 'email.mime.text', 'html.parser', 'http.cookies', 'ipaddress', 'imp', 'json', 'json.decoder', 'json.encoder', 'json.scanner', 'logging.config', 'logging.handlers', 'profile', 'pstats', diff --git a/gluon/rocket.py b/gluon/rocket.py index 69192347..b919a1b7 100644 --- a/gluon/rocket.py +++ b/gluon/rocket.py @@ -23,7 +23,11 @@ HTTP_SERVER_SOFTWARE = '%s Python/%s' % ( BUF_SIZE = 16384 SOCKET_TIMEOUT = 10 # in secs THREAD_STOP_CHECK_INTERVAL = 1 # in secs, How often should threads check for a server stop message? -IS_JYTHON = platform.system() == 'Java' # Handle special cases for Jython +if hasattr(sys, 'frozen'): + # py2installer + IS_JYTHON = False +else: + IS_JYTHON = platform.system() == 'Java' # Handle special cases for Jython IGNORE_ERRORS_ON_CLOSE = set([errno.ECONNABORTED, errno.ECONNRESET]) DEFAULT_LISTEN_QUEUE_SIZE = 5 DEFAULT_MIN_THREADS = 10 diff --git a/gluon/shell.py b/gluon/shell.py index baecdb52..92b6334b 100644 --- a/gluon/shell.py +++ b/gluon/shell.py @@ -20,6 +20,7 @@ import logging import types import re import glob +import site import traceback import gluon.fileutils as fileutils from gluon.settings import global_settings