Make Spry a compile-time option
This commit is contained in:
parent
198e735686
commit
6e680afc5c
|
@ -7,11 +7,12 @@ import ./blobsets, ./blobsets/filestores,
|
|||
./blobsets/httpservers, ./blobsets/httpstores
|
||||
|
||||
# Basic Spry
|
||||
import spryvm/spryvm
|
||||
when defined(spry):
|
||||
import spryvm/spryvm
|
||||
|
||||
# Spry extra modules
|
||||
import spryvm/sprycore, spryvm/spryextend, spryvm/sprymath, spryvm/spryos, spryvm/spryio,
|
||||
spryvm/spryoo, spryvm/sprystring, spryvm/sprymodules, spryvm/spryreflect, spryvm/sprymemfile,
|
||||
# Spry extra modules
|
||||
import spryvm/sprycore, spryvm/spryextend, spryvm/sprymath, spryvm/spryos, spryvm/spryio,
|
||||
spryvm/spryoo, spryvm/sprystring, spryvm/sprymodules, spryvm/spryreflect, spryvm /sprymemfile,
|
||||
spryvm/spryblock,
|
||||
./blobsets/spryblobs
|
||||
|
||||
|
@ -832,7 +833,8 @@ proc getLine(prompt: string): string =
|
|||
stdout.write(prompt)
|
||||
result = stdin.readline()
|
||||
|
||||
proc spryMain() =
|
||||
when defined(spry):
|
||||
proc spryMain() =
|
||||
let spry = newInterpreter()
|
||||
spry.addCore()
|
||||
spry.addExtend()
|
||||
|
@ -917,7 +919,11 @@ when isMainModule:
|
|||
of "dump": dumpMain()
|
||||
of "ingest": waitFor ingestMain()
|
||||
of "server": waitFor serverMain()
|
||||
of "spry": spryMain()
|
||||
of "spry":
|
||||
when defined(spry):
|
||||
spryMain()
|
||||
else:
|
||||
quit "not compiled with Spry interpreter"
|
||||
of "check": waitFor checkMain()
|
||||
of "replicate": waitFor replicateMain()
|
||||
else: quit("no such subcommand " & cmd)
|
||||
|
|
Loading…
Reference in New Issue
Block a user