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()