diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2023-05-25 22:29:51 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-05-25 22:29:51 +0300 |
commit | 28544d4ae10d1f4999eaa67db6fb7c4d2b351adc (patch) | |
tree | 0e91fab7c159511c3eda5b66f0a15c8efdeebf03 | |
parent | 0c45838b2f3886979666571bd004abbb63975238 (diff) | |
download | meson-pkgfix.zip meson-pkgfix.tar.gz meson-pkgfix.tar.bz2 |
Autodetect installer path location.pkgfix
-rwxr-xr-x | packaging/createpkg.py | 6 |
1 files changed, 5 insertions, 1 deletions
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', |