Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 499a002

Browse filesBrowse files
committed
Fix python 3.8 usage and better logging for missing libs
1 parent 797fbe7 commit 499a002
Copy full SHA for 499a002

File tree

Expand file treeCollapse file tree

1 file changed

+10
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-5
lines changed

‎descript/build-ffmpeg-descript.py

Copy file name to clipboardExpand all lines: descript/build-ffmpeg-descript.py
+10-5Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def getFileBaseNameWithoutVersion(file_path) -> str:
180180
#
181181
#
182182
#
183-
def getVersionVariantsForFile(file_path) -> list[str]:
183+
def getVersionVariantsForFile(file_path):
184184
"""
185185
Returns the following three files for any one of the file paths provided:
186186
`'.../ffmpeg-build-script/workspace/lib/libavcodec.58.134.100.dylib'`
@@ -206,10 +206,11 @@ def getVersionVariantsForFile(file_path) -> list[str]:
206206
#
207207
#
208208
#
209-
def copyLibraryAndDependencies(src_file, dest_folder, log_file):
209+
def copyLibraryAndDependencies(src_file, dest_folder, log_file, parent_path = ''):
210210
"""
211211
Recursive function to copy a library and its (non-system) dependencies
212212
also fixes loader paths for each library to be `@loader_path`
213+
:param: `parent_path` - optional argument to show which parent is linking against `src_file`
213214
"""
214215

215216
dest_file = os.path.join(dest_folder, os.path.basename(src_file))
@@ -243,7 +244,7 @@ def copyLibraryAndDependencies(src_file, dest_folder, log_file):
243244
if src_dependency_file.startswith('/usr/local'):
244245
# the build grabbed libraries installed on this machine
245246
# which might not be available on other machines
246-
missing_libs.add(src_dependency_file)
247+
missing_libs.add(f'{src_dependency_file} (dependency of {os.path.basename(parent_path)})')
247248
elif src_dependency_file.startswith(workspace_dir):
248249
dependency_name = os.path.basename(src_dependency_file)
249250
if not len(this_id):
@@ -260,7 +261,11 @@ def copyLibraryAndDependencies(src_file, dest_folder, log_file):
260261
copied_libs.add(variant_dest_file)
261262

262263
# RECURSIVELY copy dependencies
263-
copyLibraryAndDependencies(os.path.realpath(src_dependency_file), dest_folder, log_file)
264+
copyLibraryAndDependencies(
265+
os.path.realpath(src_dependency_file),
266+
dest_folder,
267+
log_file,
268+
src_file)
264269

265270
loader_paths_to_rewrite.append({'old_path': src_dependency_file, 'new_path': dest_dependency_path})
266271
else:
@@ -376,7 +381,7 @@ def main():
376381
build_ffmpeg_log_file.write('=======================\n')
377382
executable_path = os.path.join(workspace_bin_dir, executable)
378383
copyOrGenerateSymbolFile(executable_path, symbol_temp_dir, build_ffmpeg_log_file)
379-
copyLibraryAndDependencies(executable_path, temp_dir, build_ffmpeg_log_file)
384+
copyLibraryAndDependencies(executable_path, temp_dir, build_ffmpeg_log_file, executable_path)
380385

381386
# check that the copied file is runnable
382387
build_ffmpeg_log_file.write('\nChecking ' + executable + '\n')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.