provision: Make instructions to source venv more obvious.

(This cleans up the print formatting a bit in tools/provision
and adds an explicit step in README.md.)
This commit is contained in:
Steve Howell 2017-11-10 13:03:40 -08:00
parent c6aed00aa1
commit bad8dccef7
2 changed files with 18 additions and 4 deletions

View file

@ -77,9 +77,20 @@ the Python version this command is executed with."""
else:
warnings.warn("Your Python version does not support mypy. `tools/run-mypy` will fail.")
print("{green}Success!{end_format} Run\n {bold}source '{activate}'{end_format}\nto activate virtualenv.".format(
green='\033[92m', bold='\033[1m', end_format='\033[0m',
activate=os.path.join(base_dir, venv_dir, venv_exec_dir, 'activate')))
green = '\033[92m'
end_format = '\033[0m'
bold = '\033[1m'
print('\n')
print(green + 'Success!' + end_format)
activate_command = os.path.join(base_dir,
venv_dir,
venv_exec_dir,
'activate')
print('\nNow, run this!:')
print(bold + 'source ' + activate_command + end_format)
if __name__ == '__main__':
main()