diff --git a/ci/appveyor/build.cmd b/ci/appveyor/build.cmd index 87b403b26e3c5fe62832c66fd93d5e677b8d1372..d5b374fb3ebd70672907d496b758cc69ad28b9ea 100644 --- a/ci/appveyor/build.cmd +++ b/ci/appveyor/build.cmd @@ -20,5 +20,5 @@ if %errorlevel% neq 0 exit /b 1s python gen_translations.py if %errorlevel% neq 0 exit /b 1 -pyinstaller src/sakia/main.py --additional-hooks-dir hooks +pyinstaller sakia.spec if %errorlevel% neq 0 exit /b 1 diff --git a/ci/travis/build.sh b/ci/travis/build.sh index 7513f6abf3764271909c702099cacb14665f997e..bd31a38563cbe37c5b95394262776ae687f57918 100755 --- a/ci/travis/build.sh +++ b/ci/travis/build.sh @@ -19,10 +19,9 @@ python gen_translations.py if [ $TRAVIS_OS_NAME == "osx" ] then - pyi-makespec src/sakia/main.py --debug --additional-hooks-dir hooks - cat main.spec + pyinstaller sakia.spec elif [ $TRAVIS_OS_NAME == "linux" ] then - pyinstaller src/sakia/main.py --debug --additional-hooks-dir hooks + pyinstaller sakia.spec fi diff --git a/sakia.spec b/sakia.spec new file mode 100644 index 0000000000000000000000000000000000000000..9ab862da24f2eb82078903fef4190a1d33f8c1fa --- /dev/null +++ b/sakia.spec @@ -0,0 +1,41 @@ +# -*- mode: python -*- +from PyInstaller.compat import is_darwin + +block_cipher = None + +a = Analysis(['src/sakia/main.py'], + pathex=['.'], + binaries=None, + datas=None, + hiddenimports=[], + hookspath=['hooks'], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher) + +if is_darwin: + a.binaries = a.binaries - TOC([ + ('/usr/local/lib/libsodium.so', None, None),]) + +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + exclude_binaries=True, + name='sakia', + debug=True, + strip=False, + upx=True, + console=True ) + +coll = COLLECT(exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + name='sakia') +