From 31b1f746fee48aa21048e1b22226b1c7d0e79f3c Mon Sep 17 00:00:00 2001 From: Nico Zanferrari Date: Mon, 23 Mar 2020 12:43:58 +0100 Subject: [PATCH 1/5] Update for web2py 2.19.1 --- extras/build_web2py/web2py.mac.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', From 1ec6411cfb5a2ef997eb6ba2a223ba320a5edde7 Mon Sep 17 00:00:00 2001 From: Nico Zanferrari Date: Mon, 23 Mar 2020 12:44:47 +0100 Subject: [PATCH 2/5] Update for web2py 2.19.1 --- extras/build_web2py/web2py.win.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', From 82cb9011ac0eed49b694d7ce1d02b479c0dd3ca1 Mon Sep 17 00:00:00 2001 From: Nico Zanferrari Date: Mon, 23 Mar 2020 12:45:23 +0100 Subject: [PATCH 3/5] Update for web2py 2.19.1 --- extras/build_web2py/web2py.win_no_console.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', From b4a945b3ae310ed08d89ae9005c83294cac1bffa Mon Sep 17 00:00:00 2001 From: Nico Zanferrari Date: Mon, 23 Mar 2020 13:39:47 +0100 Subject: [PATCH 4/5] hidden import needed for PyInstaller's binaries an explicit 'import site' is needed for having a full functional interactive shell in the PyInstaller's binaries --- gluon/shell.py | 1 + 1 file changed, 1 insertion(+) 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 From ef9e2dca1faeade7bb4d708230b3e0bbd8a665d2 Mon Sep 17 00:00:00 2001 From: Nico Zanferrari Date: Mon, 23 Mar 2020 14:01:36 +0100 Subject: [PATCH 5/5] pyinstaller compatibility fix pyinstaller with python 2 on Windows does not like it --- gluon/rocket.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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