@@ -180,23 +180,20 @@ $ git push origin [name_of_your_new_branch]
180180
181181
182182### Setting up for cmd2 development
183- For doing cmd2 development, you actually do NOT want to have cmd2 installed as a Python package.
184- So if you have previously installed cmd2, make sure to uninstall it:
183+ For doing cmd2 development, it is recommended you create a virutal environment and install the package from the source.
185184``` sh
186- $ pip uninstall cmd2
187- ```
185+ # Create a new environment for cmd2
186+ $ conda create -n cmd2 python=3.6
188187
189- Assuming you cloned the repository to ` ~/src/cmd2 ` :
190- ``` sh
191- $ cd ~ /src/cmd2
192- $ pip install -e .
188+ # Activate cmd virtual environment
189+ $ source activate cmd2
193190```
194- will install cmd2 in [ editable mode] ( https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs ) .
191+
192+ Assuming you cloned the repository to ` ~/src/cmd2 ` you can install cmd2 in
193+ [ editable mode] ( https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs ) .
195194Changes to the source code are immediately available when the python interpreter
196195imports ` cmd2 ` , there is no need to re-install the module after every change. This
197- command will also install all of the runtime dependencies for ` cmd2 ` .
198-
199- Next you should install all the modules used for development of ` cmd2 ` :
196+ command will also install all of the runtime dependencies for ` cmd2 ` and modules used for development of ` cmd2 ` :
200197``` sh
201198$ cd ~ /src/cmd2
202199$ pip install -e .[dev]
@@ -229,11 +226,17 @@ have a look at `tasks.py`.
229226Now you can check if everything is installed and working:
230227``` sh
231228$ cd ~ src/cmd2
229+ $ invoke pytest
230+ ```
231+
232+ If the tests are executed it means that dependencies and project are installed succesfully.
233+
234+ You can also run the example app and see a prompt that says "(Cmd)" running the command:
235+ ``` sh
232236$ python examples/example.py
233237```
234238
235- If the example app loads, you should see a prompt that says "(Cmd)". You can
236- type ` help ` to get help or ` quit ` to quit. If you see that, then congratulations
239+ You can type ` help ` to get help or ` quit ` to quit. If you see that, then congratulations
237240– you're all set. Otherwise, refer to the cmd2 [ installation instructions] ( https://cmd2.readthedocs.io/en/latest/install.html#installing ) .
238241There also might be an error in the console of your Bash / terminal / command line
239242that will help identify the problem.
0 commit comments