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:
parent
c6aed00aa1
commit
bad8dccef7
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue