I have a strange behaviour for pyunpack, a package for unpacking, inside an executable.
I want to do the following thing:
I have a .7z type of file whose end
The output of print(abspath(".")) when running directly in python is:
C:\Users\myname\eclipse-workspace-tms\test_unzip_exe
While running with pyinstaller is:
C:\Users\myname\eclipse-workspace-tms\test_unzip_exe\dist\test
Thus, the archive is not extracted in the dist\test folder.
Fix this by setting path to return value of abspath(".") instead of hard-coding it to C:\Users\myname\eclipse-workspace-tms\test_unzip_exe
The problem is, as you found in your 2nd edit, that pyunpack needs patool installed on the target system - which, in turn, requires python.
To fix this you need to:
Use tarballs or zipfiles; shutil supports theses.
Or require the end user to have python installed.
Another way of putting it is that to use pyunpack with pyinstaller, you need python on the target system.