Skip to content

Commit acdd3ad

Browse files
Fix parso data bundling for newer python versions
1 parent f03dbf4 commit acdd3ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pyinstaller.spec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from path import Path
66
block_cipher = None
77

88
spyder_data = Path(site.getsitepackages()[-1]) / 'spyder'
9-
parso_grammar = Path(site.getsitepackages()[-1]) / 'parso/python/grammar36.txt'
9+
parso_grammar = (Path(site.getsitepackages()[-1]) / 'parso/python').glob('grammar*')
1010

1111
if sys.platform == 'linux':
1212
oce_dir = Path(sys.prefix) / 'share' / 'oce-0.18'
@@ -16,9 +16,9 @@ else:
1616
a = Analysis(['run.py'],
1717
pathex=['/home/adam/cq/CQ-editor'],
1818
binaries=[],
19-
datas=[(spyder_data ,'spyder'),
20-
(parso_grammar, 'parso/python'),
21-
(oce_dir , 'oce')],
19+
datas=[(spyder_data, 'spyder'),
20+
(oce_dir, 'oce')] +
21+
[(p, 'parso/python') for p in parso_grammar],
2222
hiddenimports=['ipykernel.datapub'],
2323
hookspath=[],
2424
runtime_hooks=['pyinstaller/pyi_rth_occ.py',
@@ -42,7 +42,7 @@ exe = EXE(pyz,
4242
upx=True,
4343
console=True,
4444
icon='icons/cadquery_logo_dark.ico')
45-
45+
4646
exclude = ('libGL','libEGL','libbsd')
4747
a.binaries = TOC([x for x in a.binaries if not x[0].startswith(exclude)])
4848

0 commit comments

Comments
 (0)