Skip to content

Commit

Permalink
pyinstaller automatic version detection using setuptools-scm
Browse files Browse the repository at this point in the history
  • Loading branch information
j5155 committed May 19, 2024
1 parent b888129 commit bd8554c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
python_ver: '3.12'
pyinstaller_ver: '==6.6.0'
spec: 'REVHubInterface.spec'
requirements: 'requirements.txt'
requirements: 'pyinstaller-build-reqs.txt'
upload_exe_with_name: 'REVHubInterface_Mac_Binary'
- name: Make DMG
uses: unofficial-rev-port/[email protected]
Expand All @@ -34,7 +34,7 @@ jobs:
python_ver: '3.12'
pyinstaller_ver: '==6.6.0'
spec: 'REVHubInterface.spec'
requirements: 'requirements.txt'
requirements: 'pyinstaller-build-reqs.txt'
upload_exe_with_name: 'REVHubInterface_Windows'
pyinstaller-build-linux:
runs-on: ubuntu-latest
Expand All @@ -45,7 +45,7 @@ jobs:
python_ver: '3.12'
pyinstaller_ver: '==6.6.0'
spec: 'REVHubInterface.spec'
requirements: 'requirements.txt'
requirements: 'pyinstaller-build-reqs.txt'
upload_exe_with_name: 'REVHubInterface_Linux'


Expand Down
4 changes: 3 additions & 1 deletion REVHubInterface.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_all
from PyInstaller.utils.hooks import collect_data_files
from setuptools_scm import get_version, _cli
_cli.main(["--force-write-version-files"])

datas = []
datas += collect_data_files('sv_ttk')
Expand Down Expand Up @@ -58,7 +60,7 @@ app = BUNDLE(
name='REVHubInterface.app',
icon='org.unofficialrevport.REVHubInterface.icns',
bundle_identifier=None,
version='DEV', # FIXME: Make dynamic
version=get_version(),
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSAppleScriptEnabled': False,
Expand Down
2 changes: 2 additions & 0 deletions pyinstaller-build-reqs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
setuptools-scm=8.1.0
-r requirements.txt

0 comments on commit bd8554c

Please sign in to comment.