Skip to content

Commit

Permalink
Use .spec file for pyinstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
thnikk committed Dec 7, 2024
1 parent 40e8124 commit 5af9eaa
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Build binary
run: |
pyinstaller main.py --add-data="style.css:." --onefile --clean --noconfirm -n pybar
pyinstaller pybar.spec
- name: Create Artifact
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
__pycache__/
build/
dist/
main.spec
47 changes: 47 additions & 0 deletions pybar.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['main.py'],
pathex=[],
binaries=[],
datas=[('style.css', '.')],
hiddenimports=[],
hookspath=[],
hooksconfig={
"gi": {
"themes": ["Adwaita"],
"icons": ["Adwaita"],
"languages": ["en_US"],
"module-versions": {
"Gtk": "3.0",
},
},
},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='pybar',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)

0 comments on commit 5af9eaa

Please sign in to comment.