From 877cfa90df1d7c658a47b876f01fc671f15c8edf Mon Sep 17 00:00:00 2001 From: Georgios Atheridis Date: Sun, 15 Jan 2023 04:16:19 +0000 Subject: [PATCH] added simple makefile. added build option. --- Makefile | 5 +++++ announcer/constants.py | 4 ++-- cli.py | 4 ++++ requirements.txt | 4 +++- setup.py | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 Makefile create mode 100644 cli.py diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f7f61bc --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +build: + pyinstaller cli.py --name "lol-announcer" --add-binary announcer/sounds:announcer/sounds + +clean: + rm -rf lol-announcer.spec build/ dist/ diff --git a/announcer/constants.py b/announcer/constants.py index 75e9373..ced52e5 100644 --- a/announcer/constants.py +++ b/announcer/constants.py @@ -36,8 +36,8 @@ SOUNDS_DIR_GLOBAL = os.path.join(os.path.dirname(__file__), "sounds/") SOUND_PACKS = dict() -for dir in os.listdir(os.path.join(os.path.dirname(__file__), "sounds/")): - SOUND_PACKS[dir] = os.path.join(os.path.dirname(__file__), "sounds/", dir) +for dir in os.listdir(SOUNDS_DIR_GLOBAL): + SOUND_PACKS[dir] = os.path.join(SOUNDS_DIR_GLOBAL, dir) for dir in os.listdir(SOUNDS_DIR_LOCAL): SOUND_PACKS[dir] = os.path.join(SOUNDS_DIR_LOCAL, dir) diff --git a/cli.py b/cli.py new file mode 100644 index 0000000..1c45a13 --- /dev/null +++ b/cli.py @@ -0,0 +1,4 @@ +from announcer.main import main + +if __name__ == "__main__": + main() diff --git a/requirements.txt b/requirements.txt index 919780d..bd699b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,10 @@ -announcer==0.0.1 +altgraph==0.17.3 audioplayer==0.6 certifi==2022.12.7 charset-normalizer==3.0.1 idna==3.4 +pyinstaller==5.7.0 +pyinstaller-hooks-contrib==2022.15 PyQt5==5.15.7 PyQt5-Qt5==5.15.2 PyQt5-sip==12.11.0 diff --git a/setup.py b/setup.py index 5c9a5bf..a8b696a 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name="announcer", - version="0.0.1", + version="0.1.0", packages=["announcer"], entry_points={ "console_scripts": [ -- 2.30.2