diff --git a/build.nims b/build.nims index 5e190f6b..aa090e71 100644 --- a/build.nims +++ b/build.nims @@ -2,24 +2,8 @@ mode = ScriptMode.Verbose import std/os except commandLineParams -const VendorPath = "vendor/nim-nat-traversal/vendor/libnatpmp-upstream" -let - oldVersionFile = joinPath(VendorPath, "VERSION") - newVersionFile = joinPath(VendorPath, "VERSION_temp") - -proc renameFile(oldName, newName: string) = - if fileExists(oldName): - mvFile(oldName, newName) - else: - echo "File ", oldName, " does not exist" - - ### Helper functions proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") = - # This is a quick workaround to avoid VERSION file conflict on macOS - # More details here: https://github.com/codex-storage/nim-codex/issues/1059 - if defined(macosx): - renameFile(oldVersionFile, newVersionFile) if not dirExists "build": mkDir "build" @@ -37,11 +21,8 @@ proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") = # Place build output in 'build' folder, even if name includes a longer path. outName = os.lastPathPart(name) cmd = "nim " & lang & " --out:build/" & outName & " " & extra_params & " " & srcDir & name & ".nim" - try: - exec(cmd) - finally: - if defined(macosx): - renameFile(newVersionFile, oldVersionFile) + + exec(cmd) proc test(name: string, srcDir = "tests/", params = "", lang = "c") = buildBinary name, srcDir, params diff --git a/vendor/nim-nat-traversal b/vendor/nim-nat-traversal index 5e405974..6508ce75 160000 --- a/vendor/nim-nat-traversal +++ b/vendor/nim-nat-traversal @@ -1 +1 @@ -Subproject commit 5e4059746e9095e1731b02eeaecd62a70fbe664d +Subproject commit 6508ce75060878dfcdfa21f94721672c69a1823b