Fix nimble build for 1.6 (#21490)

This commit is contained in:
Ivan Yonchovski
2023-03-08 15:01:08 +02:00
committed by GitHub
parent cdbcada3d7
commit d723d5ff72
3 changed files with 17 additions and 16 deletions

15
lib/compilation.nim Normal file
View File

@@ -0,0 +1,15 @@
const
NimMajor* {.intdefine.}: int = 1
## is the major number of Nim's version. Example:
##
## .. code-block:: Nim
## when (NimMajor, NimMinor, NimPatch) >= (1, 3, 1): discard
# see also std/private/since
NimMinor* {.intdefine.}: int = 6
## is the minor number of Nim's version.
## Odd for devel, even for releases.
NimPatch* {.intdefine.}: int = 11
## is the patch number of Nim's version.
## Odd for devel, even for releases.

View File

@@ -2116,21 +2116,7 @@ template unlikely*(val: bool): bool =
else:
unlikelyProc(val)
const
NimMajor* {.intdefine.}: int = 1
## is the major number of Nim's version. Example:
##
## .. code-block:: Nim
## when (NimMajor, NimMinor, NimPatch) >= (1, 3, 1): discard
# see also std/private/since
NimMinor* {.intdefine.}: int = 6
## is the minor number of Nim's version.
## Odd for devel, even for releases.
NimPatch* {.intdefine.}: int = 11
## is the patch number of Nim's version.
## Odd for devel, even for releases.
include compilation
import system/dollars
export dollars

View File

@@ -1,4 +1,4 @@
include "lib/system/compilation.nim"
include "lib/compilation.nim"
version = $NimMajor & "." & $NimMinor & "." & $NimPatch
author = "Andreas Rumpf"
description = "Compiler package providing the compiler sources as a library."