mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
Merge pull request #637 from codingCoffee/path_fix
Fixed improper pip installation
This commit is contained in:
commit
a412ab402a
@ -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:
|
||||||
|
5
setup.py
5
setup.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user