From b3501a2d4a557750abf0424ea0e4b8940ff75b1e Mon Sep 17 00:00:00 2001 From: DevicesMac Date: Tue, 11 Oct 2016 10:30:12 -0400 Subject: [PATCH] MacOS PyInstaller build files --- src/macos-build.sh | 10 ++++++++++ src/macos-gam.spec | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 src/macos-build.sh create mode 100644 src/macos-gam.spec diff --git a/src/macos-build.sh b/src/macos-build.sh new file mode 100755 index 00000000..fcb7f7d3 --- /dev/null +++ b/src/macos-build.sh @@ -0,0 +1,10 @@ +rmdir /q /s gam +rmdir /q /s build +rmdir /q /s dist +rm -rf gam-$1-macos.tar.xz + +pyinstaller --clean -F --distpath=gam macos-gam.spec +cp LICENSE gam +cp whatsnew.txt gam + +tar cfJ gam-$1-macos.tar.xz gam/ diff --git a/src/macos-gam.spec b/src/macos-gam.spec new file mode 100644 index 00000000..3cc0d518 --- /dev/null +++ b/src/macos-gam.spec @@ -0,0 +1,27 @@ +# -*- mode: python -*- +a = Analysis(['gam.py'], + pathex=['C:\\Users\\jlee\\Documents\\GitHub\\GAM'], + hiddenimports=[], + hookspath=None, + excludes=['_tkinter'], + runtime_hooks=None) +for d in a.datas: + if 'pyconfig' in d[0]: + a.datas.remove(d) + break +a.datas += [('httplib2/cacerts.txt', 'httplib2\cacerts.txt', 'DATA')] +a.datas += [('admin-settings-v2.json', 'admin-settings-v2.json', 'DATA')] +a.datas += [('cloudprint-v2.json', 'cloudprint-v2.json', 'DATA')] +a.datas += [('email-audit-v1.json', 'email-audit-v1.json', 'DATA')] +a.datas += [('email-settings-v2.json', 'email-settings-v2.json', 'DATA')] +pyz = PYZ(a.pure) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + name='gam', + debug=False, + strip=None, + upx=True, + console=True )