single spec for one file/folder

This commit is contained in:
Jay Lee
2022-12-01 18:05:55 +00:00
parent bb5beb66a7
commit bced5172d2
2 changed files with 62 additions and 28 deletions

View File

@@ -102,7 +102,7 @@ jobs:
path: | path: |
bin.tar.xz bin.tar.xz
src/cpython src/cpython
key: gam-${{ matrix.jid }}-20221101 key: gam-${{ matrix.jid }}-20221201
- name: Untar Cache archive - name: Untar Cache archive
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true' if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'

View File

@@ -1,5 +1,7 @@
# -*- mode: python ; coding: utf-8 -*- # -*- mode: python ; coding: utf-8 -*-
from os import getenv
from sys import platform from sys import platform
from PyInstaller.utils.hooks import copy_metadata from PyInstaller.utils.hooks import copy_metadata
@@ -46,31 +48,63 @@ match platform:
case _: case _:
target_arch = None target_arch = None
strip = True strip = True
exe = EXE( name = 'gam'
pyz, debug = False
a.scripts, bootloader_ignore_signals = False
[], upx = False
exclude_binaries=True, console = True
name='gam', disable_windowed_traceback = False
debug=False, argv_emulation = False
bootloader_ignore_signals=False, codesign_identity = None
strip=strip, entitlements_file = None
upx=False, if getenv('PYINSTALLER_BUILD_ONEFILE') == 'yes':
console=True, # Build one file
disable_windowed_traceback=False, exe = EXE(
argv_emulation=False, pyz,
target_arch=target_arch, a.scripts,
codesign_identity=None, a.binaries,
entitlements_file=None, a.zipfiles,
) a.datas,
coll = COLLECT( [],
exe, name=name,
a.binaries, debug=debug,
a.zipfiles, bootloader_ignore_signals=bootloader_ignore_signals,
a.datas, strip=strip,
strip=strip, upx=upx,
upx=False, console=console,
upx_exclude=[], disable_windowed_traceback=disable_windowed_traceback,
name='gam', argv_emulation=argv_emulation,
) target_arch=target_arch,
codesign_identity=codesign_identity,
entitlements_file=entitlements_file,
)
else:
# Build one folder
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name=name,
debug=debug,
bootloader_ignore_signals=bootloader_ignore_signals,
strip=strip,
upx=upx,
console=console,
disable_windowed_traceback=disable_windowed_traceback,
argv_emulation=argv_emulation,
target_arch=target_arch,
codesign_identity=codesign_identity,
entitlements_file=entitlements_file,
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=strip,
upx=upx,
upx_exclude=[],
name=name,
)