Skip to content

Commit

Permalink
Collect connector files
Browse files Browse the repository at this point in the history
  • Loading branch information
tnunamak authored Mar 8, 2024
1 parent d22a185 commit c247056
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions selfie.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
# Run poetry shell, then pyinstaller cli.spec --noconfirm

import os

def collect_connector_files(base_path):
data_files = []
for root, dirs, files in os.walk(base_path):
for file in files:
if file.endswith('.py'):
continue
file_path = os.path.join(root, file)
relative_path = os.path.relpath(file_path, base_path)
data_files.append((file_path, os.path.join('selfie/connectors', relative_path)))
return data_files

connector_files = collect_connector_files('./selfie/connectors/')

a = Analysis(
['selfie/__main__.py'],
debug=True,
Expand All @@ -11,6 +25,7 @@ a = Analysis(
datas=[
('./selfie/parsers/chat/blacklist_patterns.yaml', 'selfie/parsers/chat/'),
('./selfie/web/', 'selfie/web/'),
*connector_files,
],
hiddenimports=[
'tiktoken_ext',
Expand Down

0 comments on commit c247056

Please sign in to comment.