From 517846003f4fa64b9269c6ae833817669f17772f Mon Sep 17 00:00:00 2001 From: Jimmy Tang Date: Fri, 30 Aug 2019 19:11:06 +0100 Subject: kaldi package: fix installation of libraries (#12177) * The install for kaldi was copying library symlinks but not the actual library files, this makes sure to copy the libraries * All libraries are installed to 'prefix.lib' (the original library directory structure is no longer maintained) * The install step for executables did not account for the different dynamic library suffix on MacOS --- var/spack/repos/builtin/packages/kaldi/package.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/kaldi/package.py b/var/spack/repos/builtin/packages/kaldi/package.py index bc88598cda..461929b228 100644 --- a/var/spack/repos/builtin/packages/kaldi/package.py +++ b/var/spack/repos/builtin/packages/kaldi/package.py @@ -76,16 +76,22 @@ class Kaldi(Package): # Does not use Autotools mkdirp(prefix.bin) for root, dirs, files in os.walk('.'): for name in files: - if name.endswith(".so") or name.endswith(".cc") \ + if name.endswith("." + dso_suffix) \ + or name.endswith(".cc") \ or name.endswith(".pptx"): continue - if "configure" is name: + if "configure" == name: continue if os.access(join(root, name), os.X_OK): install(join(root, name), prefix.bin) mkdir(prefix.lib) - install_tree('lib', prefix.lib) + for root, dirs, files in os.walk('lib'): + for name in files: + if name.endswith("." + dso_suffix): + fpath = join(root, name) + src = os.readlink(fpath) + install(src, prefix.lib) for root, dirs, files in os.walk('.'): for name in files: -- cgit v1.2.3-70-g09d2