Skip to content

Commit

Permalink
Rework wscript for algos' metadata (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbogdanov committed Dec 15, 2023
1 parent 8ed5045 commit 314cfbd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/python/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ def create_algo_metadata(task):
else:
ldpath = "../build/src"

# TODO Use DYLD_LIBRARY_PATH on MacOS
if sys.platform.startswith('linux'):
ldpath_varname = 'LD_LIBRARY_PATH'
elif sys.platform == 'darwin':
ldpath_varname = 'DYLD_LIBRARY_PATH'
#TODO win32

command = """
echo "Precompute algorithms' help metadata (__doc__ and __struct__)"
echo `pwd`
Expand All @@ -90,8 +95,8 @@ cp -r ../src/python/essentia ../build/python/
cp ../build/src/python/_essentia*.so ../build/python/essentia/
#cp %s/libessentia.{so,a} ../build/python/essentia/
PYTHONPATH=../build/python LD_LIBRARY_PATH=%s %s -c '%s'
PYTHONPATH=../build/python %s=%s %s -c '%s'
set +x
echo "Algorithms' metadata created"
""" % (ldpath, ldpath, ldpath, sys.executable, python_code)
""" % (ldpath, ldpath, ldpath_varname, ldpath, sys.executable, python_code)
task.exec_command(command)

0 comments on commit 314cfbd

Please sign in to comment.