From 1205172fd44dd8813c89a7beb2abff2880c36113 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(-) (limited to 'packaging') diff --git a/packaging/createpkg.py b/packaging/createpkg.py index 3c5651407..fd022d9e5 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.2.3