renames to leveldbstatic
This commit is contained in:
parent
db0239b2ec
commit
2d399e3247
12
build.sh
12
build.sh
|
@ -3,7 +3,7 @@ root=$(dirname "$0")
|
|||
|
||||
sourceDir="${root}/vendor"
|
||||
buildDir="${root}/build"
|
||||
output="${root}/leveldb/raw.nim"
|
||||
output="${root}/leveldbstatic/raw.nim"
|
||||
|
||||
# install nimterop, if not already installed
|
||||
if ! [ -x "$(command -v toast)" ]; then
|
||||
|
@ -50,17 +50,7 @@ toast \
|
|||
--includeDirs="${buildDir}/include" \
|
||||
"${sourceDir}/include/leveldb/c.h" >> "${output}"
|
||||
|
||||
# {.compile: "./vendor
|
||||
# {.compile: root & "/vendor
|
||||
|
||||
# {.passC: "-I./vendor".}
|
||||
# {.passC: "-I./build/include".}
|
||||
# {.passC: "-I" & root/"vendor
|
||||
|
||||
|
||||
|
||||
sed -i 's/\bpassC\b/passc/g' "${output}"
|
||||
|
||||
sed -i 's/{\.compile\:\ \"\./{\.compile\:\ root\ \&\ \"/g' "${output}"
|
||||
sed -i 's/{\.passc\:\ \"-I\./{\.passc\:\ \"-I\"\ \&\ root\ \&\ \"/g' "${output}"
|
||||
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
# Package
|
||||
|
||||
version = "0.4.1"
|
||||
author = "Michał Zieliński"
|
||||
description = "LevelDB wrapper for Nim"
|
||||
license = "MIT"
|
||||
bin = @["leveldbtool"]
|
||||
installDirs = @["build", "leveldb", "vendor"]
|
||||
installFiles = @["leveldb.nim"]
|
||||
|
||||
# Dependencies
|
||||
requires "nim >= 1.4.0"
|
|
@ -9,7 +9,7 @@
|
|||
## Create a database:
|
||||
##
|
||||
## .. code-block:: Nim
|
||||
## import leveldb
|
||||
## import leveldbstatic
|
||||
## import options
|
||||
##
|
||||
## var db = leveldb.open("/tmp/mydata")
|
||||
|
@ -52,7 +52,7 @@
|
|||
## db.close()
|
||||
|
||||
import options, os, strutils
|
||||
import leveldb/raw
|
||||
import leveldbstatic/raw
|
||||
|
||||
type
|
||||
LevelDb* = ref object
|
||||
|
@ -78,7 +78,7 @@ type
|
|||
|
||||
const
|
||||
version* = block:
|
||||
const configFile = "leveldb.nimble"
|
||||
const configFile = "leveldbstatic.nimble"
|
||||
const sourcePath = currentSourcePath()
|
||||
const parentConfig = sourcePath.parentDir.parentDir / configFile
|
||||
const localConfig = sourcePath.parentDir / configFile
|
|
@ -0,0 +1,12 @@
|
|||
# Package
|
||||
|
||||
version = "0.1.0"
|
||||
author = "leveldbstatic authors"
|
||||
description = "Statically linked LevelDB wrapper for Nim"
|
||||
license = "MIT"
|
||||
bin = @["leveldbtool"]
|
||||
installDirs = @["build", "leveldbstatic", "vendor"]
|
||||
installFiles = @["leveldbstatic.nim"]
|
||||
|
||||
# Dependencies
|
||||
requires "nim >= 1.4.0"
|
|
@ -1,5 +1,5 @@
|
|||
import options, os, strutils
|
||||
import leveldb
|
||||
import leveldbstatic as leveldb
|
||||
|
||||
proc tool() =
|
||||
proc usage() =
|
||||
|
|
|
@ -12,4 +12,4 @@ bin = @["packagetest"]
|
|||
# Dependencies
|
||||
|
||||
requires "nim >= 0.18.0"
|
||||
requires "leveldb"
|
||||
requires "leveldbstatic"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
import options
|
||||
import leveldb
|
||||
import leveldbstatic as leveldb
|
||||
|
||||
when isMainModule:
|
||||
let tempDir = getTempDir() / "testleveldb" / "tooldb"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import unittest, options, os, osproc, sequtils, strutils
|
||||
import leveldb, leveldb/raw
|
||||
import leveldbstatic as leveldb
|
||||
import leveldbstatic/raw
|
||||
|
||||
const
|
||||
tmpDir = getTempDir() / "testleveldb"
|
||||
|
@ -212,7 +213,7 @@ suite "package":
|
|||
test "import as package":
|
||||
let (output, exitCode) = execNimble("install")
|
||||
check exitCode == QuitSuccess
|
||||
check output.contains("leveldb installed successfully.")
|
||||
check output.contains("leveldbstatic installed successfully.")
|
||||
|
||||
cd "tests"/"packagetest":
|
||||
var (output, exitCode) = execNimble("build")
|
||||
|
|
Loading…
Reference in New Issue