2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

docs: Add development on bench README

This commit is contained in:
Gavin D'souza 2020-08-31 14:11:29 +05:30
parent 1841b5fa9c
commit d5aebc0569

View File

@ -18,6 +18,7 @@ Bench is a command-line utility that helps you to install, update, and manage mu
- [Bench Manager](#bench-manager) - [Bench Manager](#bench-manager)
- [Guides](#guides) - [Guides](#guides)
- [Resources](#resources) - [Resources](#resources)
- [Development](#development)
- [License](#license) - [License](#license)
@ -254,6 +255,36 @@ For an exhaustive list of guides, check out [Bench Guides](https://frappe.io/doc
For an exhaustive list of resources, check out [Bench Resources](https://frappe.io/docs/user/en/bench/resources). For an exhaustive list of resources, check out [Bench Resources](https://frappe.io/docs/user/en/bench/resources).
## Development
To contribute and develop on the bench CLI tool, clone this repo and create an editable install. In editable mode, you may get the following warning everytime you run a bench command:
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
```sh
$ git clone https://github.com/frappe/bench ~/bench-repo
$ pip3 install -e ~/bench-repo
$ bench src
/Users/frappe/bench-repo
```
To clear up the editable install and switch to a stable version of bench, uninstall via pip and delete the corresponding egg file from the python path.
```sh
# Delete bench installed in editable install
$ rm -r $(find ~ -name '*.egg-info')
$ pip3 uninstall frappe-bench
# Install latest released version of bench
$ pip3 install -U frappe-bench
```
To confirm the switch, check the output of `bench src`. It should change from something like `$HOME/bench-repo` to `/usr/local/lib/python3.6/dist-packages` and stop the editable install warnings from getting triggered at every command.
## License ## License
This repository has been released under the [GNU GPLv3 License](LICENSE). This repository has been released under the [GNU GPLv3 License](LICENSE).