加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
manage.spec 2.19 KB
一键复制 编辑 原始数据 按行查看 历史
panda26 提交于 2024-08-04 16:47 . 准备实现pyinstaller打包
# -*- mode: python ; coding: utf-8 -*-
import os
project_root = os.getcwd()
# 手动添加静态文件和其他资源
static_files = [
(os.path.join(project_root, 'templates'), 'templates'),
(os.path.join(project_root, 'ApiManager/static'), 'static'),
(os.path.join(project_root, 'ApiManager/static'), 'ApiManager/static'),
(os.path.join(project_root, 'doc'), 'doc'),
(os.path.join(project_root, 'data\\logs\\all.log'), 'data\\logs\\'),
(os.path.join(project_root, 'ApiManager'), 'ApiManager'),
(os.path.join(project_root, 'HttpRunnerManager'), 'HttpRunnerManager'),
# (os.path.join(project_root, 'path_to_images'), 'path_to_images'),
# 继续添加其他目录或文件
]
a = Analysis(
['manage.py'],
pathex=[project_root],
binaries=[],
datas=static_files,
hiddenimports=[
"ApiManager",
"HttpRunnerManager",
"WebSocketApp",
"HttpRunnerManager.setting",
"HttpRunnerManager.setting.base",
"HttpRunnerManager.setting.dev",
"HttpRunnerManager.urls",
"HttpRunnerManager.asgi",
"HttpRunnerManager.middleware",
"HttpRunnerManager.activator",
'daphne',
"channels",
"channels.apps",
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
"manage",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"HttpRunnerManager.middleware.GlobalExceptionHandlerMiddleware"
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='manage',
debug=True,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='manage',
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化