From 72aa4af8325e3ada05344086ee908ed7ffb291df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 4 Nov 2023 19:48:03 +0100 Subject: [PATCH] Include shared libraries in lib folder for darwin build cx_Freeze 6.15.10 store included files in Resources folder and make a symlink in MacOS folder for lib and share. So we must include shared libraries in the lib folder to be available. (grafted from cf5adeee978b9ff2de9fc2229c9cd82c63b98302) --HG-- branch : 6.0 --- tryton/setup-freeze.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tryton/setup-freeze.py b/tryton/setup-freeze.py index 0fa7ce2f84..d97e751755 100755 --- a/tryton/setup-freeze.py +++ b/tryton/setup-freeze.py @@ -70,7 +70,7 @@ def replace_path(match): libs = [os.path.basename(p) for p in match.group(1).split(',')] required_libs.update(libs) if sys.platform == 'darwin': - libs = [os.path.join('@executable_path', l) for l in libs] + libs = [os.path.join('@executable_path', 'lib', l) for l in libs] return 'shared-library="%s"' % ','.join(libs) @@ -95,6 +95,10 @@ for ns in required_gi_namespaces: include_files.append((typefile_tmp, typefile_file)) +if sys.platform == 'darwin': + lib_dest = 'lib' +else: + lib_dest = '.' if sys.platform == 'win32': required_libs.update([ 'libepoxy-0.dll', @@ -109,7 +113,7 @@ for lib in required_libs: break else: raise Exception('%s not found' % lib) - include_files.append((path, lib)) + include_files.append((path, os.path.join(lib_dest, lib))) ssl_paths = ssl.get_default_verify_paths() include_files.append(