Add logic to install with get-pip.py on python2

This commit is contained in:
Lance Edgar 2022-01-30 10:45:53 -06:00
parent a2f5542ed8
commit fd0e55ab60

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2021 Lance Edgar # Copyright © 2010-2022 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -149,7 +149,10 @@ def install_pip(c, method=None,
apt.install(c, package, warn=True) apt.install(c, package, warn=True)
elif method == 'get-pip': elif method == 'get-pip':
c.sudo('wget -O get-pip.py https://bootstrap.pypa.io/get-pip.py') url = 'https://bootstrap.pypa.io/get-pip.py'
if not python3:
url = 'https://bootstrap.pypa.io/pip/2.7/get-pip.py'
c.sudo('wget -O get-pip.py {}'.format(url))
python = 'python3' if python3 else 'python2' python = 'python3' if python3 else 'python2'
c.sudo('{} get-pip.py'.format(python)) c.sudo('{} get-pip.py'.format(python))
c.sudo('rm get-pip.py') c.sudo('rm get-pip.py')