2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-22 20:19:01 +00:00

Merge pull request #637 from codingCoffee/path_fix

Fixed improper pip installation
This commit is contained in:
Ameya Shenoy 2018-04-15 04:12:53 +05:30 committed by GitHub
commit a412ab402a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -36,21 +36,17 @@ def install_bench(args):
# secure pip installation # secure pip installation
if find_executable('pip'): if find_executable('pip'):
run_os_command({ run_os_command({
'yum': 'sudo pip install --upgrade setuptools pip', 'pip': 'sudo pip install --upgrade setuptools pip'
'apt-get': 'sudo pip install --upgrade setuptools pip',
'brew': "sudo pip install --upgrade setuptools pip --user"
}) })
else: else:
if not os.path.exists("get-pip.py"): if not os.path.exists("get-pip.py"):
run_os_command({ run_os_command({
'apt-get': 'wget https://bootstrap.pypa.io/get-pip.py', 'wget': 'wget https://bootstrap.pypa.io/get-pip.py'
'yum': 'wget https://bootstrap.pypa.io/get-pip.py'
}) })
success = run_os_command({ success = run_os_command({
'apt-get': 'sudo python get-pip.py', 'python': 'sudo python get-pip.py --force-reinstall'
'yum': 'sudo python get-pip.py',
}) })
if success: if success:

View File

@ -1,5 +1,8 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
from pip.req import parse_requirements try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
import re, ast import re, ast
# get version from __version__ variable in bench/__init__.py # get version from __version__ variable in bench/__init__.py