update installation steps to be consistent across documentation and readme

Signed-off-by: Harsha Narayana <harsha2k4@gmail.com>
This commit is contained in:
Harsha Narayana
2018-12-22 10:52:12 +05:30
parent 82f7f847ba
commit a80499c4b7
3 changed files with 36 additions and 27 deletions

View File

@@ -25,21 +25,21 @@ Dependency Changes
effort required in managing the dependencies. Please make sure you have read and understood the following section of
the document that explains the way ``sanic`` manages dependencies inside the ``setup.py`` file.
+------------------------+-----------------------------------------------+----------------------------+
| Dependency Type | Usage | Installation |
+========================+===============================================+============================+
| requirements | Bare minimum dependencies required for sanic | pip3 install -e . |
| | to function | |
+------------------------+-----------------------------------------------+----------------------------+
| tests_require / | Dependencies required to run the Unit Tests | pip3 install -e '[.test]' |
| extras_require['test'] | for ``sanic`` | |
+------------------------+-----------------------------------------------+----------------------------+
| extras_require['dev'] | Additional Development requirements to add | pip3 install -e '[.dev]' |
| | contributing | |
+------------------------+-----------------------------------------------+----------------------------+
| extras_require['docs'] | Dependencies required to enable building and |pip3 install -e '[.docs]' |
| | enhancing sanic documentation | |
+------------------------+-----------------------------------------------+----------------------------+
+------------------------+-----------------------------------------------+--------------------------------+
| Dependency Type | Usage | Installation |
+========================+===============================================+================================+
| requirements | Bare minimum dependencies required for sanic | ``pip3 install -e .`` |
| | to function | |
+------------------------+-----------------------------------------------+--------------------------------+
| tests_require / | Dependencies required to run the Unit Tests | ``pip3 install -e '[.test]'`` |
| extras_require['test'] | for ``sanic`` | |
+------------------------+-----------------------------------------------+--------------------------------+
| extras_require['dev'] | Additional Development requirements to add | ``pip3 install -e '[.dev]'`` |
| | contributing | |
+------------------------+-----------------------------------------------+--------------------------------+
| extras_require['docs'] | Dependencies required to enable building and | ``pip3 install -e '[.docs]'`` |
| | enhancing sanic documentation | |
+------------------------+-----------------------------------------------+--------------------------------+
Running tests
-------------

View File

@@ -7,9 +7,17 @@ syntax, so earlier versions of python won't work.
## 1. Install Sanic
```
python3 -m pip install sanic
pip3 install sanic
```
To install sanic without `uvloop` or `ujson` using bash, you can provide either or both of these environmental variables
using any truthy string like `'y', 'yes', 't', 'true', 'on', '1'` and setting the `SANIC_NO_X` (`X` = `UVLOOP`/`UJSON`)
to true will stop that features installation.
```bash
SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true pip3 install sanic
```
## 2. Create a file called `main.py`
```python