Skip to content

Commit 1131c5a

Browse files
committed
fix to copy legacy vm files
1 parent 3b7368a commit 1131c5a

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

multiversx_sdk_cli/localnet/step_build_software.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,12 @@ def _do_build(cwd: Path, env: Dict[str, str]):
4949
def _copy_wasmer_libs(config: ConfigRoot, destination: Path):
5050
golang = dependencies.get_golang()
5151
vm_go_folder_name = _get_chain_vm_go_folder_name(config)
52+
vm_go_legacy_folder_name = _get_chain_vm_go_legacy_folder_name(config)
53+
5254
vm_go_path = golang.get_gopath() / "pkg" / "mod" / vm_go_folder_name
53-
wasmer_path = vm_go_path / "wasmer"
55+
vm_go_legacy_path = golang.get_gopath() / "pkg" / "mod" / vm_go_legacy_folder_name
56+
57+
wasmer_path = vm_go_legacy_path / "wasmer"
5458
wasmer2_path = vm_go_path / "wasmer2"
5559

5660
libraries.copy_libraries(wasmer_path, destination)
@@ -65,6 +69,14 @@ def _get_chain_vm_go_folder_name(config: ConfigRoot) -> str:
6569
return f"{parts[0]}@{parts[1]}"
6670

6771

72+
def _get_chain_vm_go_legacy_folder_name(config: ConfigRoot) -> str:
73+
go_mod = config.software.mx_chain_go.get_path_within_source(Path("go.mod"))
74+
lines = utils.read_lines(go_mod)
75+
line = [line for line in lines if "github.com/multiversx/mx-chain-vm-v1_4-go" in line][0]
76+
parts = line.split()
77+
return f"{parts[0]}@{parts[1]}"
78+
79+
6880
def _set_rpath(cmd_path: Path):
6981
"""
7082
Set the rpath of the executable to the current directory, on a best-effort basis.

0 commit comments

Comments
 (0)