summaryrefslogtreecommitdiff
path: root/pkg/tools/upgrade_all.py
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tools/upgrade_all.py')
-rw-r--r--pkg/tools/upgrade_all.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/tools/upgrade_all.py b/pkg/tools/upgrade_all.py
new file mode 100644
index 00000000..0732285d
--- /dev/null
+++ b/pkg/tools/upgrade_all.py
@@ -0,0 +1,13 @@
+import os
+import sys
+
+import pip
+from subprocess import call
+
+if not os.environ.get('VIRTUAL_ENV'):
+ print('[!] Should call this script inside a virtualenv, I do not want to '
+ 'mess with your system. Bye!')
+ sys.exit(1)
+
+for dist in pip.get_installed_distributions():
+ call("pip install --upgrade " + dist.project_name, shell=True)