Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,10 @@

a = Analysis(
['cli.py'],
pathex=['src'], # source package path for fosslight_binary
pathex=[],
binaries=[],
datas=[
# Use original repository location (no pre-install): third_party/dependency-check
('third_party/dependency-check/bin', 'third_party/dependency-check/bin'),
('third_party/dependency-check/lib', 'third_party/dependency-check/lib'),
('third_party/dependency-check/licenses', 'third_party/dependency-check/licenses'),
('third_party/dependency-check', 'third_party/dependency-check'), # txt/md root files
('LICENSES', 'LICENSES'),
('LICENSE', 'LICENSES'),
],
hiddenimports=[
'pkg_resources.extern',
'fosslight_binary.cli',
'fosslight_binary._jar_analysis',
'fosslight_binary._binary',
],
datas=[],
hiddenimports=['pkg_resources.extern'],
hookspath=['hooks'],
hooksconfig={},
runtime_hooks=[],
Expand Down
12 changes: 12 additions & 0 deletions hooks/hook-fosslight_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@
from PyInstaller.utils.hooks import collect_all

datas, binaries, hiddenimports = collect_all('fosslight_binary')

# Collect data files from binaryornot package
datas_binaryornot, binaries_binaryornot, hiddenimports_binaryornot = collect_all('binaryornot')
datas += datas_binaryornot
binaries += binaries_binaryornot
hiddenimports += hiddenimports_binaryornot

# Collect data files from chardet package (fixes mypyc module issues)
datas_chardet, binaries_chardet, hiddenimports_chardet = collect_all('chardet')
datas += datas_chardet
binaries += binaries_chardet
hiddenimports += hiddenimports_chardet
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ignore = E722, W503

[pytest]
filterwarnings = ignore::DeprecationWarning
norecursedirs = third_party build dist .tox .git __pycache__

[testenv:test_run]
deps =
Expand Down