From 13d402dd2587be56bc0123dfe2fe91f6202b40e6 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 20 May 2022 20:03:54 +0800 Subject: [PATCH] bugfix --- ahserver/configuredServer.py | 2 + ahserver/processorResource.py | 2 +- doodah/doodah_s.py | 1 + doodah/doodah_s.spec | 92 ++--------------------------------- 4 files changed, 9 insertions(+), 88 deletions(-) diff --git a/ahserver/configuredServer.py b/ahserver/configuredServer.py index 0290152..ffe4fc2 100644 --- a/ahserver/configuredServer.py +++ b/ahserver/configuredServer.py @@ -7,6 +7,7 @@ from aiohttp import web from appPublic.folderUtils import ProgramPath from appPublic.background import Background from appPublic.jsonConfig import getConfig +from appPublic.i18n import getI18N from sqlor.dbpools import DBPools @@ -29,6 +30,7 @@ class ConfiguredServer: if len(sys.argv) > 1: workdir = sys.argv[1] config = getConfig(workdir,{'workdir':workdir,'ProgramPath':pp}) + i18n = getI18N(path=workdir) if config.databases: DBPools(config.databases) initEnv() diff --git a/ahserver/processorResource.py b/ahserver/processorResource.py index 9d6432a..89e6f64 100644 --- a/ahserver/processorResource.py +++ b/ahserver/processorResource.py @@ -27,7 +27,7 @@ from aiohttp.web_response import Response, StreamResponse from aiohttp.web_routedef import AbstractRouteDef from appPublic.jsonConfig import getConfig -from appPublic.MiniI18N import getI18N +from appPublic.i18n import getI18N from appPublic.dictObject import DictObject, multiDict2Dict from appPublic.timecost import TimeCost from appPublic.timeUtils import timestampstr diff --git a/doodah/doodah_s.py b/doodah/doodah_s.py index 5f13abc..0770077 100755 --- a/doodah/doodah_s.py +++ b/doodah/doodah_s.py @@ -37,6 +37,7 @@ rf.register('getI18nMapping', getI18nMapping) p = os.getcwd() if len(sys.argv) > 1: p = sys.argv[1] +print('p=', p) server = ConfiguredServer(auth_klass=MyAuthAPI,workdir=p) load_plugins(p) server.run() diff --git a/doodah/doodah_s.spec b/doodah/doodah_s.spec index 05b42a6..f3446b2 100644 --- a/doodah/doodah_s.spec +++ b/doodah/doodah_s.spec @@ -1,105 +1,27 @@ # -*- mode: python ; coding: utf-8 -*- - block_cipher = None -exs=[ - "FLAC", - "Ogg", - "Opus", - "OpusFile", - "SDL2", - "SDL2_image", - "SDL2_mixer", - "SDL2_ttf", - "caio", - "cv2", - "ffpyplayer", - "kivy", - "kiwisolver", - "libSDL2-2.0.0.dylib", - "libSDL2_mixer-2.0.0.dylib", - "libass.9.dylib", - "libavcodec.58.54.100.dylib", - "libavcodec.58.91.100.dylib", - "libavdevice.58.10.100.dylib", - "libavfilter.7.85.100.dylib", - "libavformat.58.29.100.dylib", - "libavformat.58.45.100.dylib", - "libavresample.4.0.0.dylib", - "libavutil.56.31.100.dylib", - "libavutil.56.51.100.dylib", - "libbluray.2.dylib", - "libfreetype.6.dylib", - "libfribidi.0.dylib", - "libmp3lame.0.dylib", - "libmpdec.3.dylib", - "libogg.0.dylib", - "libopenblas.0.dylib", - "libopus.0.dylib", - "libvorbis.0.dylib", - "libvorbisenc.2.dylib", - "libvorbisfile.3.dylib", - "libwebp.7.dylib", - "libwebpdemux.2.dylib", - "libwebpmux.3.dylib", - "libx264.160.dylib", - "libx265.192.dylib", - "matplotlib", - "mpg123", - "multidict", - "numba", - "numpy", - "objc", - "pandas", - "psutil", - "scipy" - -] a = Analysis(['doodah_s.py'], - pathex=['/Volumes/home/ymq/pydev/github/ahserver/doodah'], + pathex=['/home/ymq/pydev/github/ahserver/doodah'], binaries=[], datas=[], - hiddenimports=[ - "multidict" - ], + hiddenimports=[], hookspath=[], - hooksconfig={}, runtime_hooks=[], - excludes=[ - "FLAC", - "Ogg", - "Opus", - "OpusFile", - "SDL2", - "SDL2_image", - "SDL2_mixer", - "SDL2_ttf", - "cv2", - "ffpyplayer", - "kivy", - "matplotlib", - "mpg123", - "numba", - "numpy", - "objc", - "pandas", - "psutil", - "scipy" - ], + excludes=[], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher, noarchive=False) pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) - exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, - a.datas, + a.datas, [], name='doodah_s', debug=False, @@ -108,8 +30,4 @@ exe = EXE(pyz, upx=True, upx_exclude=[], runtime_tmpdir=None, - console=True, - disable_windowed_traceback=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None ) + console=True )