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

@ -36,7 +36,10 @@ This repository contains the source code for Zulip's PyPI packages:
./tools/provision -p <path_to_your_python_version>` ./tools/provision -p <path_to_your_python_version>`
``` ```
5. You should now be able to run all the tests within this virtualenv. 5. The above step, if successful, will tell you the command to "source" your
virtual environment. Run that command!
6. You should now be able to run all the tests within this virtualenv.
### Running tests ### Running tests

View file

@ -77,9 +77,20 @@ the Python version this command is executed with."""
else: else:
warnings.warn("Your Python version does not support mypy. `tools/run-mypy` will fail.") 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'
green='\033[92m', bold='\033[1m', end_format='\033[0m', end_format = '\033[0m'
activate=os.path.join(base_dir, venv_dir, venv_exec_dir, 'activate'))) 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__': if __name__ == '__main__':
main() main()