diff --git a/src/loaih/build.py b/src/loaih/build.py index 1276404..9e18b7c 100644 --- a/src/loaih/build.py +++ b/src/loaih/build.py @@ -683,3 +683,13 @@ class Build(): if not self.debug: # Cleaning up build directory shutil.rmtree(self.builddir) + + +def libfinderhelper(libraryname): + """Uses system tools to identify the missing package.""" + + libsearch = subprocess.run(shlex.split( + f"sudo apt-file find -lx {libraryname}$" + ), check=True, capture_output=True) + candidate = [ x for x in libsearch.stdout.decode('utf-8').split('\n') if 'lib' in x ][0] + return candidate