2018-02-13 19:20:27 +01:00
|
|
|
packageName = "eth_keys"
|
2018-04-10 20:07:40 +03:00
|
|
|
version = "0.0.2"
|
2018-02-08 10:51:13 +01:00
|
|
|
author = "Status Research & Development GmbH"
|
|
|
|
description = "A reimplementation in pure Nim of eth-keys, the common API for Ethereum key operations."
|
2018-03-02 11:57:43 +01:00
|
|
|
license = "Apache License 2.0 or MIT"
|
2018-04-10 20:07:40 +03:00
|
|
|
# srcDir = "src"
|
2018-04-28 09:12:20 +03:00
|
|
|
skipDirs = @["src", "tests", "Nim", "old_api"]
|
2018-02-08 10:51:13 +01:00
|
|
|
|
|
|
|
### Dependencies
|
2018-02-14 16:24:29 +01:00
|
|
|
|
2018-04-28 09:13:39 +03:00
|
|
|
requires "nim > 0.18.0",
|
2018-05-31 09:37:48 +03:00
|
|
|
"nimcrypto",
|
2018-04-28 09:13:39 +03:00
|
|
|
"secp256k1"
|
2018-02-08 10:51:13 +01:00
|
|
|
|
2018-03-21 16:45:39 +01:00
|
|
|
proc test(name: string, lang: string = "c") =
|
2018-02-08 10:51:13 +01:00
|
|
|
if not dirExists "build":
|
2018-02-13 19:20:27 +01:00
|
|
|
mkDir "build"
|
2018-02-08 10:51:13 +01:00
|
|
|
if not dirExists "nimcache":
|
|
|
|
mkDir "nimcache"
|
|
|
|
--run
|
|
|
|
--nimcache: "nimcache"
|
|
|
|
switch("out", ("./build/" & name))
|
2018-02-13 19:20:27 +01:00
|
|
|
setCommand lang, "tests/" & name & ".nim"
|
|
|
|
|
2018-04-10 20:07:40 +03:00
|
|
|
task test, "Run all tests - C only & libsecp256k1 backend":
|
|
|
|
test "tests"
|
2018-03-01 16:33:34 +01:00
|
|
|
|
2018-04-10 20:07:40 +03:00
|
|
|
# task test_cpp, "Run all tests - C++ only & libsecp256k1 backend":
|
|
|
|
# test "all_tests", "cpp"
|
2018-03-21 16:45:39 +01:00
|
|
|
|
2018-04-10 20:07:40 +03:00
|
|
|
# task test, "Run all tests - C and C++ & libsecp256k1 backend":
|
|
|
|
# exec "nimble test_c"
|
|
|
|
# exec "rm ./nimcache/*"
|
|
|
|
# exec "nimble test_cpp"
|
2018-03-21 17:59:50 +01:00
|
|
|
|
2018-04-10 20:07:40 +03:00
|
|
|
# task test_backend_native, "Run all tests - pure Nim backend":
|
|
|
|
# switch("define", "backend_native")
|
|
|
|
# test "all_tests", "cpp"
|