summaryrefslogtreecommitdiff
path: root/pkg/tools/upgrade_all.py
blob: d297e42d9ad2240a675afbc096d51fcf2ba80b59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
import sys

import pip
from subprocess import call

if not os.environ.get('VIRTUAL_ENV'):
<<<<<<< HEAD
    print('[!] Should call this script inside a virtualenv, I do not want to '
          'mess with your system. Bye!')
=======
    print('[!] Should call this script inside a virtualenv, I do not want to mess '
          'with your system. Bye!')
>>>>>>> 135aa3ac... [docs] add ability to upgrade an existing virtualenv
    sys.exit(1)

for dist in pip.get_installed_distributions():
    call("pip install --upgrade " + dist.project_name, shell=True)