From aa64b74859e716a539b3ac2e36139be1391e9f83 Mon Sep 17 00:00:00 2001 From: Conor Walker <2089327w@student.gla.ac.uk> Date: Tue, 25 Jan 2022 22:57:10 +0000 Subject: [PATCH] rename + reshuffle --- main.py => src/pydle.py | 2 +- src/pydle.spec | 40 +++++++++++++++++++++++++++++ words.txt => src/resource/words.txt | 0 3 files changed, 41 insertions(+), 1 deletion(-) rename main.py => src/pydle.py (96%) create mode 100644 src/pydle.spec rename words.txt => src/resource/words.txt (100%) diff --git a/main.py b/src/pydle.py similarity index 96% rename from main.py rename to src/pydle.py index 5c282ed..ad6907b 100644 --- a/main.py +++ b/src/pydle.py @@ -22,7 +22,7 @@ def resource_path(relative_path): def getWord(): - lines = open(resource_path('words.txt')).read().splitlines() + lines = open(resource_path('resource/words.txt')).read().splitlines() return random.choice(lines) diff --git a/src/pydle.spec b/src/pydle.spec new file mode 100644 index 0000000..189460b --- /dev/null +++ b/src/pydle.spec @@ -0,0 +1,40 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['pydle.py'], + pathex=[], + binaries=[], + datas=[('resource\\words.txt', '.')], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='pydle', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None ) diff --git a/words.txt b/src/resource/words.txt similarity index 100% rename from words.txt rename to src/resource/words.txt