-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds
requires
flag which allows to add extra packages to the depend…
…ency resolution (#1266) * Adds `requires` flag which allows to add extra packages to the dependency resolution * adds `used` to test * Update src/nimble.nim --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
- Loading branch information
Showing
6 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version = "0.1.0" | ||
author = "Ivan Yonchovski" | ||
description = "Nim package manager." | ||
license = "BSD" | ||
|
||
requires "timezones == 0.5.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo "def727" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{.used.} | ||
import unittest, os | ||
import testscommon | ||
from nimblepkg/common import cd | ||
|
||
suite "requires flag": | ||
test "can add additional requirements to package with legacy solver": | ||
cleanDir(installDir) | ||
cd "requireflag": | ||
let (outp, exitCode) = execNimble("--requires: stew; results > 0.1", "--solver:legacy", "install") | ||
check exitCode == QuitSuccess | ||
check outp.processOutput.inLines("Success: results installed successfully.") | ||
check outp.processOutput.inLines("Success: stew installed successfully.") | ||
|
||
test "can add additional requirements to package with sat solver": | ||
cleanDir(installDir) | ||
cd "requireflag": | ||
let (outp, exitCode) = execNimble("--requires: stew; results > 0.1", "--solver:sat", "install") | ||
check exitCode == QuitSuccess | ||
check outp.processOutput.inLines("Success: results installed successfully.") | ||
check outp.processOutput.inLines("Success: stew installed successfully.") |