1. Try opening the spec file and after the line that says 'block_cipher =
None' put:
def get_libgphoto2_path():
import libgphoto2
libgphoto2_path = libgphoto2.__path__[0]
return libgphoto2_path
2. Then after the lines that say 'pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)' put:
dict_tree = Tree(get_libgphoto2_path(), prefix='libgphoto2',
excludes=["*.pyc"])
a.datas += dict_tree
a.binaries = filter(lambda x: 'libgphoto2' not in x[0], a.binaries)
3. Then go to your command line and run the following command:
pyinstaller your_file_name.spec --specpath=test
Then run the executable.
On Fri, Apr 3, 2020 at 9:06 AM Abasi Brown <[email protected]> wrote:
> 1. Try opening the spec file and after the line that says 'block_cipher =
> None' put:
>
> def get_gphoto2_path():
> import gphoto2
> gphoto2_path = gphoto2.__path__[0]
> return gphoto2_path
>
> 2. Then after the lines that say 'pyz = PYZ(a.pure, a.zipped_data,
> cipher=block_cipher)' put:
>
> dict_tree = Tree(get_gphoto2_path(), prefix='gphoto2', excludes=["*.pyc"])
> a.datas += dict_tree
> a.binaries = filter(lambda x: 'gphoto2' not in x[0], a.binaries)
>
> 3. Then go to your command line and run the following command:
>
> pyinstaller your_file_name.spec --specpath=test
>
> Then run the executable.
>
> On Fri, Apr 3, 2020 at 3:19 AM Craigs List <[email protected]> wrote:
>
>> I'm attempting to build a project with gphoto2. gphoto2 requires brew
>> install libgphoto2.
>>
>> The binary is created successfully, but when I run the binary on a
>> machine that doesn't have libgphoto2, it fails. once i brew install the
>> package is continues to work.
>>
>> help?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "PyInstaller" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pyinstaller/bd4a338a-1941-48dc-870f-36d4a2b1a57f%40googlegroups.com
>> <https://groups.google.com/d/msgid/pyinstaller/bd4a338a-1941-48dc-870f-36d4a2b1a57f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyinstaller/CA%2BjnrzNenMRE1iCH-d0VmdNi_4WCe6eu1N1hQBFJcc0rX7FZyw%40mail.gmail.com.