From a80499c4b7acc506a19cc908c78af4ff74a89d4f Mon Sep 17 00:00:00 2001 From: Harsha Narayana Date: Sat, 22 Dec 2018 10:52:12 +0530 Subject: [PATCH] update installation steps to be consistent across documentation and readme Signed-off-by: Harsha Narayana --- README.rst | 23 ++++++++++++----------- docs/sanic/contributing.rst | 30 +++++++++++++++--------------- docs/sanic/getting_started.md | 10 +++++++++- 3 files changed, 36 insertions(+), 27 deletions(-) diff --git a/README.rst b/README.rst index b064612d..a1406a14 100644 --- a/README.rst +++ b/README.rst @@ -48,6 +48,18 @@ Sanic is developed `on GitHub `_. We als If you have a project that utilizes Sanic make sure to comment on the `issue `_ that we use to track those projects! +Installation +------------ + +- ``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. + +- ``SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true pip install sanic`` + + Hello World Example ------------------- @@ -65,17 +77,6 @@ Hello World Example if __name__ == '__main__': app.run(host='0.0.0.0', port=8000) -Installation ------------- - -- ``pip 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 NO_X to true will stop that features -installation. - -- ``SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true pip install sanic`` - Documentation ------------- diff --git a/docs/sanic/contributing.rst b/docs/sanic/contributing.rst index b9402da3..e8d6b69c 100644 --- a/docs/sanic/contributing.rst +++ b/docs/sanic/contributing.rst @@ -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 ------------- diff --git a/docs/sanic/getting_started.md b/docs/sanic/getting_started.md index 73a25e58..0c05389d 100644 --- a/docs/sanic/getting_started.md +++ b/docs/sanic/getting_started.md @@ -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