Skip to content

Commit

Permalink
Supress message when self-fulfilling dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ddevault committed Oct 14, 2014
1 parent 4e8f9b4 commit 665a3ee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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):
Expand Down

0 comments on commit 665a3ee

Please sign in to comment.