Only copy needed slang dlls

This commit is contained in:
Kovid Goyal
2026-06-30 12:11:18 +05:30
parent 847175c12f
commit 3bb0f432d2

View File

@@ -10,7 +10,7 @@ import subprocess
import tarfile import tarfile
import time import time
from bypy.constants import LIBDIR, BIN, OUTPUT_DIR, PREFIX, python_major_minor_version from bypy.constants import BIN, LIBDIR, OUTPUT_DIR, PREFIX, python_major_minor_version
from bypy.freeze import extract_extension_modules, freeze_python, path_to_freeze_dir from bypy.freeze import extract_extension_modules, freeze_python, path_to_freeze_dir
from bypy.utils import get_dll_path, mkdtemp, py_compile, walk from bypy.utils import get_dll_path, mkdtemp, py_compile, walk
@@ -90,13 +90,13 @@ def copy_libs(env):
shutil.copy2(x, dest) shutil.copy2(x, dest)
dest = os.path.join(dest, os.path.basename(x)) dest = os.path.join(dest, os.path.basename(x))
subprocess.check_call(['chrpath', '-d', dest]) subprocess.check_call(['chrpath', '-d', dest])
# Copy slangc # Copy slang
for x in ('compiler', 'rt'): x = 'libslang-compiler.so'
x = f'libslang-{x}.so' shutil.copy2(os.path.join(LIBDIR, f'{x}.0.0.0.0'), env.lib_dir)
shutil.copy2(os.path.join(LIBDIR, f'{x}.0.0.0.0'), env.lib_dir) os.symlink(f'{x}.0.0.0.0', os.path.join(env.lib_dir, x))
os.symlink(f'{x}.0.0.0.0', os.path.join(env.lib_dir, x)) for x in ('glsl-module', 'glslang'):
shutil.copy2(os.path.join(LIBDIR, 'libslang-glsl-module-0.0.0.so'), env.lib_dir) x = f'libslang-{x}-0.0.0.so'
shutil.copy2(os.path.join(LIBDIR, 'libslang-glslang-0.0.0.so'), env.lib_dir) shutil.copy2(os.path.join(LIBDIR, x), env.lib_dir)
shutil.copy2(os.path.join(BIN, 'slangc'), env.bin_dir) shutil.copy2(os.path.join(BIN, 'slangc'), env.bin_dir)