From a0ff7a0257813836aa596d501b3a0f3887ce5afd Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Tue, 15 Nov 2022 10:03:49 +0100 Subject: [PATCH] dfas --- .gitignore | 2 ++ build.sh | 15 +++++---------- run_cli.spec | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/run_cli.py | 4 ++++ 4 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 run_cli.spec create mode 100644 src/run_cli.py diff --git a/.gitignore b/.gitignore index 263b2b9..bc6c53c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,7 @@ __pycache__/ *.mp3 *.cache* +/dist/* + /build/* !/build/build.sh diff --git a/build.sh b/build.sh index af875e8..e98042d 100644 --- a/build.sh +++ b/build.sh @@ -1,18 +1,13 @@ -# https://packaging.python.org/en/latest/tutorials/packaging-projects/ -# cd .. -# cp ../README.md README.md +pyinstaller --onefile src/run_cli.py +exit + +# https://packaging.python.org/en/latest/tutorials/packaging-projects/ echo "building......" python3 -m pip install --upgrade build python3 -m build echo "uploading......." python3 -m pip install --upgrade twine -twine upload dist/* +twine upload dist/music_kraken* # twine upload --repository testpypi dist/* - -# echo "cleaning up......." -# rm README.md -# cd ../build -# rm -rf dist -# mv ../src/dist . diff --git a/run_cli.spec b/run_cli.spec new file mode 100644 index 0000000..ce4d5e7 --- /dev/null +++ b/run_cli.spec @@ -0,0 +1,44 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis( + ['src/run_cli.py'], + pathex=[], + binaries=[], + datas=[], + 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='run_cli', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) diff --git a/src/run_cli.py b/src/run_cli.py new file mode 100644 index 0000000..e075326 --- /dev/null +++ b/src/run_cli.py @@ -0,0 +1,4 @@ +from music_kraken.__main__ import cli + +if __name__ == "__main__": + cli()