From 37889dc3bd61a91d4c9189a35428a4428910ee4f Mon Sep 17 00:00:00 2001 From: Markus Merklinger Date: Tue, 24 Sep 2024 15:16:23 +0200 Subject: [PATCH 1/3] Adapt build dependencies for Linux --- ci-scripts/linux/pyinstaller/nitrokey-app-onedir.spec | 9 ++------- ci-scripts/linux/pyinstaller/nitrokey-app-onefile.spec | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/ci-scripts/linux/pyinstaller/nitrokey-app-onedir.spec b/ci-scripts/linux/pyinstaller/nitrokey-app-onedir.spec index 64c364f0..a320ed3c 100644 --- a/ci-scripts/linux/pyinstaller/nitrokey-app-onedir.spec +++ b/ci-scripts/linux/pyinstaller/nitrokey-app-onedir.spec @@ -8,16 +8,13 @@ python_version = str(sys.version_info[0]) + '.' + str(sys.version_info[1]) datas = [ (venv_path + '/lib/python' + python_version + '/site-packages/fido2/public_suffix_list.dat', 'fido2'), - (venv_path + '/lib/python' + python_version + '/site-packages/pynitrokey/VERSION', 'pynitrokey'), ('../../../nitrokeyapp/ui', 'nitrokeyapp/ui'), ('../../../LICENSE', '.') ] datas += copy_metadata('ecdsa') datas += copy_metadata('fido2') datas += copy_metadata('nitrokeyapp') -datas += copy_metadata('pynitrokey') -datas += copy_metadata('pyusb') -datas += copy_metadata('spsdk') +datas += copy_metadata('nitrokey') block_cipher = None @@ -26,9 +23,7 @@ block_cipher = None a = Analysis( ['../../../nitrokeyapp/__main__.py'], pathex=[], - binaries=[ - (venv_path + '/lib/python' + python_version + '/site-packages/libusbsio/bin/linux_x86_64/libusbsio.so', 'libusbsio') - ], + binaries=[], datas=datas, hiddenimports=[], hookspath=[], diff --git a/ci-scripts/linux/pyinstaller/nitrokey-app-onefile.spec b/ci-scripts/linux/pyinstaller/nitrokey-app-onefile.spec index 1c730466..f89f1a07 100644 --- a/ci-scripts/linux/pyinstaller/nitrokey-app-onefile.spec +++ b/ci-scripts/linux/pyinstaller/nitrokey-app-onefile.spec @@ -8,16 +8,13 @@ python_version = str(sys.version_info[0]) + '.' + str(sys.version_info[1]) datas = [ (venv_path + '/lib/python' + python_version + '/site-packages/fido2/public_suffix_list.dat', 'fido2'), - (venv_path + '/lib/python' + python_version + '/site-packages/pynitrokey/VERSION', 'pynitrokey'), ('../../../nitrokeyapp/ui', 'nitrokeyapp/ui'), ('../../../LICENSE', '.') ] datas += copy_metadata('ecdsa') datas += copy_metadata('fido2') datas += copy_metadata('nitrokeyapp') -datas += copy_metadata('pynitrokey') -datas += copy_metadata('pyusb') -datas += copy_metadata('spsdk') +datas += copy_metadata('nitrokey') block_cipher = None @@ -26,9 +23,7 @@ block_cipher = None a = Analysis( ['../../../nitrokeyapp/__main__.py'], pathex=[], - binaries=[ - (venv_path + '/lib/python' + python_version + '/site-packages/libusbsio/bin/linux_x86_64/libusbsio.so', 'libusbsio') - ], + binaries=[], datas=datas, hiddenimports=[], hookspath=[], From 13d6b6904b0ba0226abf2c4bb18b9fd36066d934 Mon Sep 17 00:00:00 2001 From: Markus Merklinger Date: Tue, 24 Sep 2024 15:18:23 +0200 Subject: [PATCH 2/3] Adapt build dependencies for Windows --- .github/workflows/cd-windows.yaml | 2 -- .../windows/pyinstaller/nitrokey-app-onedir.spec | 10 ++-------- .../windows/pyinstaller/nitrokey-app-onefile.spec | 10 ++-------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cd-windows.yaml b/.github/workflows/cd-windows.yaml index 737f1534..1f38d260 100644 --- a/.github/workflows/cd-windows.yaml +++ b/.github/workflows/cd-windows.yaml @@ -46,7 +46,6 @@ jobs: - name: Build onedir run: | Invoke-Expression "$(poetry env info --path)\Scripts\Activate.ps1" - make build-ui pyinstaller ci-scripts/windows/pyinstaller/nitrokey-app-onedir.spec - name: Upload artifacts uses: actions/upload-artifact@v4 @@ -74,7 +73,6 @@ jobs: - name: Build onefile run: | Invoke-Expression "$(poetry env info --path)\Scripts\Activate.ps1" - make build-ui pyinstaller ci-scripts/windows/pyinstaller/nitrokey-app-onefile.spec - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/ci-scripts/windows/pyinstaller/nitrokey-app-onedir.spec b/ci-scripts/windows/pyinstaller/nitrokey-app-onedir.spec index 0b82b58b..7fb8d70b 100644 --- a/ci-scripts/windows/pyinstaller/nitrokey-app-onedir.spec +++ b/ci-scripts/windows/pyinstaller/nitrokey-app-onedir.spec @@ -5,7 +5,6 @@ import os venv_path = os.popen('poetry env info --path').read().rstrip() datas = [ - (venv_path + '\\Lib\\site-packages\\pynitrokey\\VERSION', 'pynitrokey'), (venv_path + '\\Lib\\site-packages\\fido2\\public_suffix_list.dat', 'fido2'), ('..\\..\\..\\nitrokeyapp\\ui', 'nitrokeyapp\\ui'), ('..\\..\\..\\LICENSE', '.') @@ -13,9 +12,7 @@ datas = [ datas += copy_metadata('ecdsa') datas += copy_metadata('fido2') datas += copy_metadata('nitrokeyapp') -datas += copy_metadata('pynitrokey') -datas += copy_metadata('pyusb') -datas += copy_metadata('spsdk') +datas += copy_metadata('nitrokey') block_cipher = None @@ -24,10 +21,7 @@ block_cipher = None a = Analysis( ['..\\..\\..\\nitrokeyapp\\__main__.py'], pathex=[], - binaries=[ - (venv_path + '\\Lib\\site-packages\\libusbsio\\bin\\x64\\libusbsio.dll', 'libusbsio'), - (venv_path + '\\Lib\\site-packages\\usb1\\libusb-1.0.dll', '.') - ], + binaries=[], datas=datas, hiddenimports=[], hookspath=[], diff --git a/ci-scripts/windows/pyinstaller/nitrokey-app-onefile.spec b/ci-scripts/windows/pyinstaller/nitrokey-app-onefile.spec index edda3c21..02edacfd 100644 --- a/ci-scripts/windows/pyinstaller/nitrokey-app-onefile.spec +++ b/ci-scripts/windows/pyinstaller/nitrokey-app-onefile.spec @@ -5,7 +5,6 @@ import os venv_path = os.popen('poetry env info --path').read().rstrip() datas = [ - (venv_path + '\\Lib\\site-packages\\pynitrokey\\VERSION', 'pynitrokey'), (venv_path + '\\Lib\\site-packages\\fido2\\public_suffix_list.dat', 'fido2'), ('..\\..\\..\\nitrokeyapp\\ui', 'nitrokeyapp\\ui'), ('..\\..\\..\\LICENSE', '.') @@ -13,9 +12,7 @@ datas = [ datas += copy_metadata('ecdsa') datas += copy_metadata('fido2') datas += copy_metadata('nitrokeyapp') -datas += copy_metadata('pynitrokey') -datas += copy_metadata('pyusb') -datas += copy_metadata('spsdk') +datas += copy_metadata('nitrokey') block_cipher = None @@ -24,10 +21,7 @@ block_cipher = None a = Analysis( ['..\\..\\..\\nitrokeyapp\\__main__.py'], pathex=[], - binaries=[ - (venv_path + '\\Lib\\site-packages\\libusbsio\\bin\\x64\\libusbsio.dll', 'libusbsio'), - (venv_path + '\\Lib\\site-packages\\usb1\\libusb-1.0.dll', '.') - ], + binaries=[], datas=datas, hiddenimports=[], hookspath=[], From c38f9d81023e2ea6012cc8c47b49e5b6ad2740da Mon Sep 17 00:00:00 2001 From: Markus Merklinger Date: Tue, 24 Sep 2024 15:20:04 +0200 Subject: [PATCH 3/3] Adapt build dependencies for macOS --- .../macos/pyinstaller/nitrokey-app-onedir_arm64.spec | 9 ++------- .../macos/pyinstaller/nitrokey-app-onedir_intel64.spec | 9 ++------- .../macos/pyinstaller/nitrokey-app-onefile_arm64.spec | 9 ++------- .../macos/pyinstaller/nitrokey-app-onefile_intel64.spec | 9 ++------- 4 files changed, 8 insertions(+), 28 deletions(-) diff --git a/ci-scripts/macos/pyinstaller/nitrokey-app-onedir_arm64.spec b/ci-scripts/macos/pyinstaller/nitrokey-app-onedir_arm64.spec index a6a4af7f..2f502cc5 100644 --- a/ci-scripts/macos/pyinstaller/nitrokey-app-onedir_arm64.spec +++ b/ci-scripts/macos/pyinstaller/nitrokey-app-onedir_arm64.spec @@ -8,23 +8,18 @@ python_version = str(sys.version_info[0]) + '.' + str(sys.version_info[1]) datas = [ (venv_path + '/lib/python' + python_version + '/site-packages/fido2/public_suffix_list.dat', 'fido2'), - (venv_path + '/lib/python' + python_version + '/site-packages/pynitrokey/VERSION', 'pynitrokey'), ('../../../nitrokeyapp/ui', 'nitrokeyapp/ui'), ('../../../LICENSE', '.') ] datas += copy_metadata('ecdsa') datas += copy_metadata('fido2') datas += copy_metadata('nitrokeyapp') -datas += copy_metadata('pynitrokey') -datas += copy_metadata('pyusb') -datas += copy_metadata('spsdk') +datas += copy_metadata('nitrokey') a = Analysis( ['../../../nitrokeyapp/__main__.py'], pathex=[], - binaries=[ - (venv_path + '/lib/python' + python_version + '/site-packages/libusbsio/bin/osx_arm64/libusbsio.dylib', 'libusbsio') - ], + binaries=[], datas=datas, hiddenimports=[], hookspath=[], diff --git a/ci-scripts/macos/pyinstaller/nitrokey-app-onedir_intel64.spec b/ci-scripts/macos/pyinstaller/nitrokey-app-onedir_intel64.spec index ebe6ffe0..96dde38a 100644 --- a/ci-scripts/macos/pyinstaller/nitrokey-app-onedir_intel64.spec +++ b/ci-scripts/macos/pyinstaller/nitrokey-app-onedir_intel64.spec @@ -8,23 +8,18 @@ python_version = str(sys.version_info[0]) + '.' + str(sys.version_info[1]) datas = [ (venv_path + '/lib/python' + python_version + '/site-packages/fido2/public_suffix_list.dat', 'fido2'), - (venv_path + '/lib/python' + python_version + '/site-packages/pynitrokey/VERSION', 'pynitrokey'), ('../../../nitrokeyapp/ui', 'nitrokeyapp/ui'), ('../../../LICENSE', '.') ] datas += copy_metadata('ecdsa') datas += copy_metadata('fido2') datas += copy_metadata('nitrokeyapp') -datas += copy_metadata('pynitrokey') -datas += copy_metadata('pyusb') -datas += copy_metadata('spsdk') +datas += copy_metadata('nitrokey') a = Analysis( ['../../../nitrokeyapp/__main__.py'], pathex=[], - binaries=[ - (venv_path + '/lib/python' + python_version + '/site-packages/libusbsio/bin/osx_x86_64/libusbsio.dylib', 'libusbsio') - ], + binaries=[], datas=datas, hiddenimports=[], hookspath=[], diff --git a/ci-scripts/macos/pyinstaller/nitrokey-app-onefile_arm64.spec b/ci-scripts/macos/pyinstaller/nitrokey-app-onefile_arm64.spec index 1439974e..c2a99844 100644 --- a/ci-scripts/macos/pyinstaller/nitrokey-app-onefile_arm64.spec +++ b/ci-scripts/macos/pyinstaller/nitrokey-app-onefile_arm64.spec @@ -8,23 +8,18 @@ python_version = str(sys.version_info[0]) + '.' + str(sys.version_info[1]) datas = [ (venv_path + '/lib/python' + python_version + '/site-packages/fido2/public_suffix_list.dat', 'fido2'), - (venv_path + '/lib/python' + python_version + '/site-packages/pynitrokey/VERSION', 'pynitrokey'), ('../../../nitrokeyapp/ui', 'nitrokeyapp/ui'), ('../../../LICENSE', '.') ] datas += copy_metadata('ecdsa') datas += copy_metadata('fido2') datas += copy_metadata('nitrokeyapp') -datas += copy_metadata('pynitrokey') -datas += copy_metadata('pyusb') -datas += copy_metadata('spsdk') +datas += copy_metadata('nitrokey') a = Analysis( ['../../../nitrokeyapp/__main__.py'], pathex=[], - binaries=[ - (venv_path + '/lib/python' + python_version + '/site-packages/libusbsio/bin/osx_arm64/libusbsio.dylib', 'libusbsio') - ], + binaries=[], datas=datas, hiddenimports=[], hookspath=[], diff --git a/ci-scripts/macos/pyinstaller/nitrokey-app-onefile_intel64.spec b/ci-scripts/macos/pyinstaller/nitrokey-app-onefile_intel64.spec index ffe444fb..c3dd2a03 100644 --- a/ci-scripts/macos/pyinstaller/nitrokey-app-onefile_intel64.spec +++ b/ci-scripts/macos/pyinstaller/nitrokey-app-onefile_intel64.spec @@ -8,23 +8,18 @@ python_version = str(sys.version_info[0]) + '.' + str(sys.version_info[1]) datas = [ (venv_path + '/lib/python' + python_version + '/site-packages/fido2/public_suffix_list.dat', 'fido2'), - (venv_path + '/lib/python' + python_version + '/site-packages/pynitrokey/VERSION', 'pynitrokey'), ('../../../nitrokeyapp/ui', 'nitrokeyapp/ui'), ('../../../LICENSE', '.') ] datas += copy_metadata('ecdsa') datas += copy_metadata('fido2') datas += copy_metadata('nitrokeyapp') -datas += copy_metadata('pynitrokey') -datas += copy_metadata('pyusb') -datas += copy_metadata('spsdk') +datas += copy_metadata('nitrokey') a = Analysis( ['../../../nitrokeyapp/__main__.py'], pathex=[], - binaries=[ - (venv_path + '/lib/python' + python_version + '/site-packages/libusbsio/bin/osx_x86_64/libusbsio.dylib', 'libusbsio') - ], + binaries=[], datas=datas, hiddenimports=[], hookspath=[],