Skip to content

Commit

Permalink
Use a specfile for pyinstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
CoffeeCoder1 committed Aug 27, 2024
1 parent 37f799f commit 290d8f0
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install dependencies
run: pip install .[packaging]
- name: Build executable
run: python3 package.py
run: pyinstaller --noconfirm pyinstaller.spec
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ MANIFEST
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
#*.spec

# Installer logs
pip-log.txt
Expand Down
14 changes: 0 additions & 14 deletions package.py

This file was deleted.

53 changes: 53 additions & 0 deletions pyinstaller.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -*- mode: python ; coding: utf-8 -*-

a = Analysis(
['src/email_draft_generator/gui/__main__.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)

pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='E-mail Draft Generator',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['assets/icon.png'],
)

coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='E-mail Draft Generator',
)

app = BUNDLE(
coll,
name='E-mail Draft Generator.app',
icon='assets/icon.png',
bundle_identifier=None,
)

0 comments on commit 290d8f0

Please sign in to comment.