Skip to content

Commit

Permalink
cd: Fix pyinstaller spec
Browse files Browse the repository at this point in the history
After we migrated to the Nitrokey Python SDK, we no longer depend on
spsdk so the pyinstaller setup can no longer access its metadata (and
does not need it anymore).
  • Loading branch information
robin-nitrokey committed Sep 16, 2024
1 parent c779623 commit 7cf7933
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 22 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/cd-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ jobs:
. venv/bin/activate
pip install flit
flit install --symlink
- name: Patch oscrypto
run: |
. venv/bin/activate
pip uninstall -y oscrypto
: # This uses an oscrypto version to avoid issue #431
pip install "oscrypto @ git+https://github.com/wbond/oscrypto.git@1547f535001ba568b239b8797465536759c742a3"
- name: Build
run: |
. venv/bin/activate
Expand Down
7 changes: 2 additions & 5 deletions ci-scripts/linux/pyinstaller/pynitrokey-onedir.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ datas += copy_metadata('pynitrokey')
datas += copy_metadata('ecdsa')
datas += copy_metadata('fido2')
datas += copy_metadata('pyusb')
datas += copy_metadata('spsdk')


block_cipher = None
Expand All @@ -20,9 +19,7 @@ block_cipher = None
a = Analysis(
['../../../nitropy.py'],
pathex=[],
binaries=[
('../../../venv/lib/python3.9/site-packages/libusbsio/bin/linux_x86_64/libusbsio.so', 'libusbsio')
],
binaries=[],
datas=datas,
hiddenimports=[],
hookspath=[],
Expand Down Expand Up @@ -62,4 +59,4 @@ coll = COLLECT(
upx=True,
upx_exclude=[],
name='nitropy',
)
)
7 changes: 2 additions & 5 deletions ci-scripts/linux/pyinstaller/pynitrokey-onefile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ datas += copy_metadata('pynitrokey')
datas += copy_metadata('ecdsa')
datas += copy_metadata('fido2')
datas += copy_metadata('pyusb')
datas += copy_metadata('spsdk')


block_cipher = None
Expand All @@ -20,9 +19,7 @@ block_cipher = None
a = Analysis(
['../../../nitropy.py'],
pathex=[],
binaries=[
('../../../venv/lib/python3.9/site-packages/libusbsio/bin/linux_x86_64/libusbsio.so', 'libusbsio')
],
binaries=[],
datas=datas,
hiddenimports=[],
hookspath=[],
Expand Down Expand Up @@ -56,4 +53,4 @@ exe = EXE(
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
)
4 changes: 1 addition & 3 deletions ci-scripts/windows/pyinstaller/pynitrokey-onedir.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ datas += copy_metadata('pynitrokey')
datas += copy_metadata('ecdsa')
datas += copy_metadata('fido2')
datas += copy_metadata('pyusb')
datas += copy_metadata('spsdk')


block_cipher = None
Expand All @@ -21,7 +20,6 @@ a = Analysis(
['..\\..\\..\\nitropy.py'],
pathex=[],
binaries=[
('..\\..\\..\\venv\\Lib\\site-packages\\libusbsio\\bin\\x64\\libusbsio.dll', 'libusbsio'),
('..\\..\\..\\venv\\Lib\\site-packages\\usb1\\libusb-1.0.dll', '.')
],
datas=datas,
Expand Down Expand Up @@ -66,4 +64,4 @@ coll = COLLECT(
upx=True,
upx_exclude=[],
name='nitropy',
)
)
4 changes: 1 addition & 3 deletions ci-scripts/windows/pyinstaller/pynitrokey-onefile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ datas += copy_metadata('pynitrokey')
datas += copy_metadata('ecdsa')
datas += copy_metadata('fido2')
datas += copy_metadata('pyusb')
datas += copy_metadata('spsdk')


block_cipher = None
Expand All @@ -21,7 +20,6 @@ a = Analysis(
['..\\..\\..\\nitropy.py'],
pathex=[],
binaries=[
('..\\..\\..\\venv\\Lib\\site-packages\\libusbsio\\bin\\x64\\libusbsio.dll', 'libusbsio'),
('..\\..\\..\\venv\\Lib\\site-packages\\usb1\\libusb-1.0.dll', '.')
],
datas=datas,
Expand Down Expand Up @@ -60,4 +58,4 @@ exe = EXE(
icon=None,
version='file_version_info.txt',
uac_admin=False,
)
)

0 comments on commit 7cf7933

Please sign in to comment.