2
0
mirror of https://github.com/frappe/bench.git synced 2025-02-13 08:18:27 +00:00

chore: setup distutils inside travis

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai 2020-02-20 20:12:28 +05:30
parent 986015c13c
commit 0a9effdfb4
No known key found for this signature in database
GPG Key ID: 75507BE256F40CED
2 changed files with 7 additions and 2 deletions

View File

@ -5,7 +5,7 @@ python:
- "2.7"
install:
- sudo pip install urllib3 pyOpenSSL ndg-httpsclient pyasn1
- sudo pip install urllib3 pyOpenSSL ndg-httpsclient pyasn1 distutils
- 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/

View File

@ -406,7 +406,12 @@ def parse_commandline_args():
if __name__ == '__main__':
if sys.version[0] == '2':
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":