SHA256
1
0
Adam Majer 2024-04-03 14:34:22 +00:00 committed by Git OBS Bridge
parent d8b9b394de
commit 38a579f0dc
2 changed files with 7 additions and 7 deletions

View File

@ -14,7 +14,7 @@ Index: node-v20.12.0/tools/install.py
try_unlink(target_path) # prevent ETXTBSY errors
return shutil.copy2(source_path, target_path)
+def libdir():
+def libdir(options):
+ libdir_fq = sysconfig.get_config_var("LIBDIR")
+ return re.sub("^" + re.escape(options.prefix + "/"), "", libdir_fq)
+
@ -26,7 +26,7 @@ Index: node-v20.12.0/tools/install.py
def package_files(options, action, name, bins):
- target_path = os.path.join('lib/node_modules', name)
+ target_path = os.path.join(libdir(), 'node_modules', name)
+ target_path = os.path.join(libdir(options), 'node_modules', name)
# don't install npm if the target path is a symlink, it probably means
# that a dev version of npm is installed there
@ -35,7 +35,7 @@ Index: node-v20.12.0/tools/install.py
action(options, [link_path], os.path.join('bin', bin_name))
elif action == install:
- try_symlink(options, os.path.join('../lib/node_modules', name, bin_target), link_path)
+ try_symlink(options, os.path.join('..', libdir(), 'node_modules', name, bin_target), link_path)
+ try_symlink(options, os.path.join('..', libdir(options), 'node_modules', name, bin_target), link_path)
else:
assert 0 # unhandled action type

View File

@ -29,8 +29,8 @@ Index: node-v20.12.0/tools/install.py
try_remove(options, path, dest)
def package_files(options, action, name, bins):
- target_path = os.path.join(libdir(), 'node_modules', name)
+ target_path = os.path.join(libdir(), 'node_modules', name + '20')
- target_path = os.path.join(libdir(options), 'node_modules', name)
+ target_path = os.path.join(libdir(options), 'node_modules', name + '20')
# don't install npm if the target path is a symlink, it probably means
# that a dev version of npm is installed there
@ -38,8 +38,8 @@ Index: node-v20.12.0/tools/install.py
if action == uninstall:
action(options, [link_path], os.path.join('bin', bin_name))
elif action == install:
- try_symlink(options, os.path.join('..', libdir(), 'node_modules', name, bin_target), link_path)
+ try_symlink(options, os.path.join('..', libdir(), 'node_modules', name + '20', bin_target), link_path)
- try_symlink(options, os.path.join('..', libdir(options), 'node_modules', name, bin_target), link_path)
+ try_symlink(options, os.path.join('..', libdir(options), 'node_modules', name + '20', bin_target), link_path)
else:
assert 0 # unhandled action type