Skip to content

Commit 220c99b

Browse files
committed
adding pyinstaller workflow
adding pyinstaller workflow adding pyinstaller workflow adding pyinstaller workflow adding pyinstaller workflow adding pyinstaller workflow pyinstaller workflow pyinstaller workflow
1 parent f7cb53c commit 220c99b

File tree

3 files changed

+42
-3
lines changed

3 files changed

+42
-3
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pyinstaller package
2+
3+
on:
4+
push:
5+
branches: [ master, feature ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
name: Build & Test on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
matrix:
16+
os: [ubuntu-24.04, ubuntu-22.04, windows-latest]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
python -m pip install flake8 pytest pylint
24+
- name: Install
25+
run: |
26+
python -m pip install .
27+
- name: Make executable
28+
uses: sayyid5416/pyinstaller@v1
29+
with:
30+
python-version: 3.12
31+
spec: 'packaging/gui-tklinux.spec'
32+
upload_exe_with_name: 'isp-programmer-${{ matrix.os }}'

packaging/gui-tklinux.spec

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ binaries = []
66
hiddenimports = []
77
tmp_ret = collect_all('isp_programmer')
88
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
9+
tmp_ret = collect_all('pyserial')
10+
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
11+
tmp_ret = collect_all('serial')
12+
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
913

1014

1115
a = Analysis(
@@ -29,10 +33,11 @@ exe = EXE(
2933
a.binaries,
3034
a.datas,
3135
[],
32-
name='gui-tk',
36+
name='isp-programmer',
3337
debug=False,
3438
bootloader_ignore_signals=False,
35-
strip=False,
39+
#strip=False,
40+
strip=True,
3641
upx=True,
3742
upx_exclude=[],
3843
runtime_tmpdir=None,

src/isp_programmer/gui.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from quick import gui_it
22

3-
from . cli import gr1 as cli_main
3+
from .cli import gr1 as cli_main
4+
45

56
def main():
67
gui_it(cli_main)
78

9+
810
if __name__ == "__main__":
911
main()

0 commit comments

Comments
 (0)