summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-01-15 17:21:01 -0400
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-02-13 14:03:12 -0300
commitb226c1a3c44df3bfe9b888be1f8661a69f53a88b (patch)
tree6e8aa667e6a8e4c4bdcc938a1287ea7e04cc658a
parente52f9a239a146c06a0683e47eaf9d53f4deb332b (diff)
gather bitmask dependency tree
-rw-r--r--Makefile3
-rwxr-xr-xpkg/scripts/filter-bitmask-deps35
2 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e7173c80..3ef61df9 100644
--- a/Makefile
+++ b/Makefile
@@ -119,5 +119,8 @@ install_wheel:
# if it's the first time, you'll need to get_wheels first
pip install --pre --use-wheel --no-index --find-links=../wheelhouse -r pkg/requirements.pip
+gather_deps:
+ pipdeptree | pkg/scripts/filter-bitmask-deps
+
clean :
$(RM) $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc)
diff --git a/pkg/scripts/filter-bitmask-deps b/pkg/scripts/filter-bitmask-deps
new file mode 100755
index 00000000..9808d394
--- /dev/null
+++ b/pkg/scripts/filter-bitmask-deps
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+"""
+Filter bitmask dependencies.
+
+Usage: pipdeptree | filter-bitmask-deps
+"""
+import fileinput
+
+TARGET = "leap.bitmask"
+
+
+def get_bitmask_deps(dep_lines):
+ res = []
+ begin = False
+ for dep in dep_lines:
+ if dep.startswith(TARGET):
+ begin = True
+ res.append(dep)
+ continue
+ elif dep.startswith(' ') and begin:
+ res.append(dep)
+ continue
+ if begin:
+ return res
+
+
+if __name__ == "__main__":
+ lines = []
+ for line in fileinput.input():
+ lines.append(line)
+
+ bitmask_deps = get_bitmask_deps(lines)
+ for line in bitmask_deps:
+ print line[:-1]