Files
nim-http-utils/httputils.nimble
Miran 7d771ca337 specify the version of unittest2 dependency (#51)
* specify the version of unittest2 dependency

Otherwise, nimble's `--resolver:minver` picks up unittest2 0.0.1,
which doesn't work.
Also, take an opportunity to specify the minimal versions for other
dependencies.
2026-08-24 12:52:05 +02:00

38 lines
1.3 KiB
Nim

mode = ScriptMode.Verbose
packageName = "httputils"
version = "0.5.1"
author = "Status Research & Development GmbH"
description = "HTTP request/response helpers & parsing procedures"
license = "Apache License 2.0"
skipDirs = @["tests", "Nim"]
### Dependencies
requires "nim >= 1.6.18",
"results >= 0.5.0",
"stew >= 0.5.0",
"unittest2 >= 0.2.0"
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
let verbose = getEnv("V", "") notin ["", "0"]
let cfg =
" --styleCheck:usages --styleCheck:error" &
(if verbose: "" else: " --verbosity:0 --hints:off") &
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f"
proc build(args, path: string) =
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path
proc run(args, path: string) =
build args & " --mm:refc -r", path
if (NimMajor, NimMinor) > (1, 6):
build args & " --mm:orc -r", path
task test, "Run all tests":
for threads in ["--threads:off", "--threads:on"]:
run threads & " -d:release", "tests/tvectors"
run threads & " -d:useSysAssert -d:useGcAssert", "tests/tvectors"