Is there a python equivalent of PAR::Packer? If so then you could embed your packed python exe with the packed perl exe. e.g., something like:
pp --addfile packed_python.exe -o yourtool.exe yourtool.pl
In your perl script you would need to find the packed python exe and call it, e.g.:
$python_exe = Path::Class::file ($ENV{PAR_TEMP}, 'inc', 'packed_python.exe');
Your perl script will need to check for $ENV{PAR_0} to control the use of a packed python exe, otherwise debugging can be a pain, but this can be factored into a sub and the general approach does work.
Addendum - unsurprisingly, there are tools to pack python exes. I have no idea if these work, but this link looks handy at first glance: https://medium.com/dreamcatcher-its-blog/making-an-stand-alone-executable-from-a-python-script-using-pyinstaller-d1df9170e263 |