From 665a3eeacb945a5a2069c215cf45c81d30d4e36b Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 13 Oct 2014 21:06:17 -0600 Subject: [PATCH] Supress message when self-fulfilling dependencies --- project.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/project.py b/project.py index b3ed3a5..905e333 100644 --- a/project.py +++ b/project.py @@ -67,10 +67,14 @@ def install(self, packages, site_only, init=False): exit(1) for dep in info.json()['dependencies']: if not dep in extra and not dep in deps: - print("Adding dependency: " + dep) - extra.append(dep) + if dep == self.full_name(): + print("Notice: this project fulfills the '{0}' dependency, skipping".format(dep)) + else: + print("Adding dependency: " + dep) + extra.append(dep) files = [] all_packages = extra + packages + all_packages = [p for p in all_packages if p != self.full_name()] # Download packages for p in all_packages: stdout.write("\rDownloading {0}".format(p)) @@ -91,7 +95,6 @@ def install(self, packages, site_only, init=False): deps.append(package) self.set_config("dependencies", " ".join(deps)) # Remove the package we're working on, since it'll fulfill the dependency implicitly - packages = [p for p in packages if p != self.full_name()] # Install packages pkgroot = os.path.join(self.root, ".knightos", "pkgroot") for i, f in enumerate(files):