From e8379da44ce1840fabc165e0c2cafdce61cd5719 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 5 Feb 2015 14:24:16 -0600 Subject: [PATCH] PyInstaller tweaks --- loopy.spec | 41 ++++++++++++++++++++++++++++++----------- run-pyinstaller.sh | 1 - 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/loopy.spec b/loopy.spec index d2b85b45e..85ad633e7 100644 --- a/loopy.spec +++ b/loopy.spec @@ -1,6 +1,7 @@ # -*- mode: python -*- block_cipher = None +single_file = True a = Analysis(['bin/loopy'], @@ -8,17 +9,35 @@ a = Analysis(['bin/loopy'], hiddenimports=[], hookspath=None, runtime_hooks=None, - excludes=["hedge"], + excludes=["hedge", "meshpy", "pyopencl"], cipher=block_cipher) pyz = PYZ(a.pure, cipher=block_cipher) -exe = EXE(pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - name='loopy', - debug=False, - strip=None, - upx=True, - console=True ) + +if single_file: + exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + name='loopy', + debug=False, + strip=None, + upx=True, + console=True) +else: + exe = EXE(pyz, + a.scripts, + exclude_binaries=True, + name='loopy', + debug=False, + strip=None, + upx=True, + console=True) + coll = COLLECT(exe, + a.binaries, + a.zipfiles, + a.datas, + strip=None, + upx=True, + name='loopy') diff --git a/run-pyinstaller.sh b/run-pyinstaller.sh index 23e2774e2..c88389bb4 100755 --- a/run-pyinstaller.sh +++ b/run-pyinstaller.sh @@ -5,4 +5,3 @@ rm -Rf dist/loopy pyinstaller \ --workpath=build/pyinstaller \ loopy.spec -# --onedir \ -- GitLab