Skip to content

Commit

Permalink
Update python-app.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
paule32 authored Mar 17, 2024
1 parent de7d32b commit 0dd5d1d
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,34 @@ jobs:
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
python3 -m pip install pysqlite3
python3 -m pip install PyQt5
python3 -m pip install PyQt5-sip
python3 -m pip install PyQtWebEngine
- name: Start Python in PowerShell ...
shell: pwsh
run: |
$env:MY_WORK_DIR = "${{ github.workspace }}"
python3 --version
python3 -c "print('Create ByteCode ...')"
D:
cd $env:MY_WORK_DIR\\src
python3 -m compileall observer.py
(
pyinstaller --noconfirm --onefile --console
--icon "$env:MY_WORK_DIR\\src\\img\\floppy-disk.ico"
--splash "$env:MY_WORK_DIR\\src\\img\\splash.png"
--version-file "$env:MY_WORK_DIR\\src\\version.info"
--add-data "$env:MY_WORK_DIR\\src\\LICENSE;."
--add-data "$env:MY_WORK_DIR\\src\\locales;locales\\"
--add-data "$env:MY_WORK_DIR\\src\\img;img\\"
$env:MY_WORK_DIR = "${{ github.workspace }}" \
$pythonExe = Get-Command python -ErrorAction Ignore \
if ($pythonExe) { \
D: \
cd $env:MY_WORK_DIR\\src \
python3 --version \
Write-Output "Python is installed." \
} else { \
Write-Output "Python is not installed, try to install it..." \
python -m pip install --upgrade pip \
pip install flake8 pytest \
python3 -m pip install pysqlite3 \
python3 -m pip install PyQt5 \
python3 -m pip install PyQt5-sip \
python3 -m pip install PyQtWebEngine \
} \
Write-Output "Create ByteCode ..." \
python3 -m compileall observer.py \
pyinstaller --noconfirm --onefile --console \
--icon "$env:MY_WORK_DIR\\src\\img\\floppy-disk.ico" \
--splash "$env:MY_WORK_DIR\\src\\img\\splash.png" \
--version-file "$env:MY_WORK_DIR\\src\\version.info" \
--add-data "$env:MY_WORK_DIR\\src\\LICENSE;." \
--add-data "$env:MY_WORK_DIR\\src\\locales;locales\\" \
--add-data "$env:MY_WORK_DIR\\src\\img;img\\" \
"$env:MY_WORK_DIR\\src\\observer.py"
)
Run-Linux:
name: Build for Linux
Expand Down

0 comments on commit 0dd5d1d

Please sign in to comment.