Skip to content

Commit ccc62e8

Browse files
committed
add pathmatcher pyinstaller setup
Signed-off-by: Stephen L. <[email protected]>
1 parent 261bdcf commit ccc62e8

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ var/
2727
# PyInstaller
2828
# Usually these files are written by a python script from a template
2929
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30-
*.manifest
31-
*.spec
30+
#*.manifest
31+
#*.spec
3232

3333
# Installer logs
3434
pip-log.txt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pyinstaller --onedir pathmatcher_pyinstaller-win64.spec > pyinstaller-log.txt 2>&1 & type pyinstaller-log.txt
2+
pyi-archive_viewer dist\pathmatcher.exe -r -b > pyinstaller-dependencies.txt
3+
pause
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# -*- mode: python -*-
2+
3+
block_cipher = None
4+
5+
import os, sys
6+
cur_path = os.path.realpath('.')
7+
sys.path.append(os.path.join(cur_path)) # for gooey spec file, because it does not support relative paths (yet?)
8+
9+
import gooey
10+
gooey_root = os.path.dirname(gooey.__file__)
11+
gooey_languages = Tree(os.path.join(gooey_root, 'languages'), prefix = 'gooey/languages')
12+
gooey_images = Tree(os.path.join(gooey_root, 'images'), prefix = 'gooey/images')
13+
14+
a = Analysis([os.path.join('pathmatcher.py')],
15+
pathex=[os.path.join(cur_path)],
16+
binaries=[],
17+
datas=[],
18+
hiddenimports=[os.path.join(cur_path, 'gooey'), os.path.join(cur_path, 'tqdm')],
19+
hookspath=[],
20+
runtime_hooks=[],
21+
excludes=['pandas', 'numpy', 'matplotlib', 'mpl-data', 'zmq', 'IPython', 'ipykernel', 'tcl', 'Tkinter', 'jupyter_client', 'ipywidgets', 'unittest', 'ipython', 'ipython_genutils', 'jupyter_core'],
22+
win_no_prefer_redirects=False,
23+
win_private_assemblies=False,
24+
cipher=block_cipher)
25+
pyz = PYZ(a.pure, a.zipped_data,
26+
cipher=block_cipher)
27+
exe = EXE(pyz,
28+
a.scripts,
29+
a.binaries,
30+
a.zipfiles,
31+
a.datas,
32+
gooey_languages, # Add them in to collected files
33+
gooey_images, # Same here.
34+
name='pathmatcher',
35+
debug=False,
36+
strip=False,
37+
upx=True,
38+
windowed=True,
39+
console=True )

0 commit comments

Comments
 (0)