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
This commit is contained in:
Jimmy Tang 2019-08-30 19:11:06 +01:00 committed by Peter Scheibel
parent f635a376bd
commit 517846003f

View File

@ -76,16 +76,22 @@ def install(self, spec, prefix):
mkdirp(prefix.bin) mkdirp(prefix.bin)
for root, dirs, files in os.walk('.'): for root, dirs, files in os.walk('.'):
for name in files: 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"): or name.endswith(".pptx"):
continue continue
if "configure" is name: if "configure" == name:
continue continue
if os.access(join(root, name), os.X_OK): if os.access(join(root, name), os.X_OK):
install(join(root, name), prefix.bin) install(join(root, name), prefix.bin)
mkdir(prefix.lib) 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 root, dirs, files in os.walk('.'):
for name in files: for name in files: