mirror of
https://github.com/frappe/bench.git
synced 2025-01-22 22:58:31 +00:00
Merge pull request #929 from Thunderbottom/fix-easy_install
chore: fix easy_install
This commit is contained in:
commit
d701fe86a7
@ -8,7 +8,7 @@ install:
|
||||
- sudo pip install urllib3 pyOpenSSL ndg-httpsclient pyasn1
|
||||
- sudo apt-get purge -y mysql-common mysql-server mysql-client
|
||||
- sudo apt-get install --only-upgrade -y git
|
||||
- sudo apt-get install hhvm && rm -rf /home/travis/.kiex/
|
||||
- sudo apt-get install hhvm python-distutils && rm -rf /home/travis/.kiex/
|
||||
- mkdir -p ~/.bench
|
||||
- mkdir -p /tmp/.bench
|
||||
- cp -r $TRAVIS_BUILD_DIR/* ~/.bench
|
||||
|
@ -1,5 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
import os, sys, subprocess, getpass, json, multiprocessing, shutil, platform, warnings, datetime
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import getpass
|
||||
import json
|
||||
import multiprocessing
|
||||
import shutil
|
||||
import platform
|
||||
import warnings
|
||||
import datetime
|
||||
|
||||
|
||||
tmp_bench_repo = os.path.join('/', 'tmp', '.bench')
|
||||
tmp_log_folder = os.path.join('/', 'tmp', 'logs')
|
||||
@ -395,8 +406,16 @@ def parse_commandline_args():
|
||||
|
||||
if __name__ == '__main__':
|
||||
if sys.version[0] == '2':
|
||||
if not raw_input("It is recommended to run this script with Python 3\nDo you still wish to continue? [Y/n]: ").lower() == "y":
|
||||
sys.exit()
|
||||
try:
|
||||
from disutils.spawn import find_executable
|
||||
except ImportError:
|
||||
print("Please install distutils or use Python3 to run the script")
|
||||
print("$ pip install distutils")
|
||||
sys.exit(1)
|
||||
shutil.which = find_executable
|
||||
if not os.environ.get('CI'):
|
||||
if not raw_input("It is recommended to run this script with Python 3\nDo you still wish to continue? [Y/n]: ").lower() == "y":
|
||||
sys.exit()
|
||||
|
||||
if not is_sudo_user():
|
||||
log("Please run this script as a non-root user with sudo privileges", level=3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user