From 28544d4ae10d1f4999eaa67db6fb7c4d2b351adc Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 25 May 2023 22:29:51 +0300 Subject: Autodetect installer path location. --- packaging/createpkg.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packaging/createpkg.py b/packaging/createpkg.py index 3c56514..fd022d9 100755 --- a/packaging/createpkg.py +++ b/packaging/createpkg.py @@ -16,6 +16,7 @@ import subprocess import shutil, sys, os +from glob import glob import xml.etree.ElementTree as ET @@ -41,7 +42,10 @@ class PkgGenerator: if os.path.exists(self.pkg_dir): shutil.rmtree(self.pkg_dir) os.mkdir(self.pkg_dir) - pyinstaller_bin = '/Users/jpakkane/Library/Python/3.8/bin/pyinstaller' + pyinstaller_bin = glob('/Users/jpakkane/Library/Python/*/bin/pyinstaller') + if len(pyinstaller_bin) != 1: + sys.exit('Could not determine unique installer.') + pyinstaller_bin = pyinstaller_bin[0] pyinst_cmd = [pyinstaller_bin, '--clean', '--additional-hooks-dir=packaging', -- cgit v1.1