Open oerpli opened 4 years ago
This projects depends on some hackish way to bundle fzf
binaries for multiple platforms into wheels by extending internal features of setuptools, Python's packaging framework. So it's indeed likely to break PyInstaller in any way. Frankly, I don't have any experience on PyInstaller, and have no spare time to deeply look into that. If someone sends a patch to fix this problem I'm going to review as soon as possible. Thanks!
The same problem applies to Linux too.
https://github.com/nk412/pyfzf doesn't have this problem, but you have to bundle fzf yourself.
We've recently revamped the way it packages and vendors fzf
. Could you try again with the latest release?
It works, but not as simple as pyinstaller script.py
One has to edit their script.spec
file
(more info on the pyinstaller docs)
OR use the --add-binary
argument.
Better to just create the .spec
without using the cli arguments. A plain text .spec
is easier to edit/tinker-with, and certainly easier to re-use (pyinstaller --noconfirm /path/to/script.spec
).
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['script.py'],
pathex=['path/to/script'], # Edit
binaries=[('path/to/iterfzf/fzf_binary', 'iterfzf')], # Edit path/to
datas=[], # can work here too, it seems the distinction is more about semantics (?)
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
# ...
# rest of configuration
then pyinstaller /path/to/script.spec
I tried to create an executable with PyInstaller from my script (
pyinstaller --onefile script.py
). This results in the following error:I am not sure if this problem is from PyInstaller or from iterfzf - I found a maybe related issue in their repo, with various other packages that are affected: https://github.com/pyinstaller/pyinstaller/issues/2752
OS: Windows 10 Python: 3.7.3 PyInstaller: 3.5 iterfzf: 0.5.0.17.5 (installed from github; had the same issue with latest version from pip)