From d854bc64c85645f38e0133663c06c996df96f7dc Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Wed, 26 Oct 2016 20:16:35 +0200 Subject: [PATCH] Fix import inside nimble.nimble when Nimble is installed. --- nimble.nimble | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nimble.nimble b/nimble.nimble index 99431ac..7b3917a 100644 --- a/nimble.nimble +++ b/nimble.nimble @@ -1,4 +1,10 @@ -import src/nimblepkg/common +when dirExists("src"): + # In the git repository the Nimble sources are in a ``src`` directory. + import src/nimblepkg/common +else: + # When the package is installed, the ``src`` directory disappears. + import nimblepkg/common + # Package version = nimbleVersion