From 58d970197129fa4e01e229980f02f10b5a99b50d Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 31 Oct 2018 11:47:45 -0500 Subject: [PATCH] Use sphinx-tabs --- docs/.rstcheck.cfg | 2 +- docs/conf.py | 1 + docs/install.rst | 52 +++++++++++++++++++++----------------------- requirements/pip.txt | 1 + 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/.rstcheck.cfg b/docs/.rstcheck.cfg index 72c06777226..1b093d3f696 100644 --- a/docs/.rstcheck.cfg +++ b/docs/.rstcheck.cfg @@ -1,4 +1,4 @@ [rstcheck] -ignore_directives=automodule,http:get +ignore_directives=automodule,http:get,tabs,tab ignore_roles=djangosetting,setting ignore_messages=(Duplicate implicit target name: ".*")|(Hyperlink target ".*" is not referenced) diff --git a/docs/conf.py b/docs/conf.py index cef9d14196e..d5ddc85ad50 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,6 +27,7 @@ 'sphinxcontrib.httpdomain', 'djangodocs', 'doc_extensions', + 'sphinx_tabs.tabs', ] templates_path = ['_templates'] diff --git a/docs/install.rst b/docs/install.rst index e9e72c1f3a4..4d6f85d625b 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -29,43 +29,41 @@ Additionally Read the Docs depends on: In order to get all the dependencies successfully installed, you need these libraries. -On Mac OS -~~~~~~~~~ +.. tabs:: + + .. tab:: Mac OS -If you are having trouble on OS X Mavericks -(or possibly other versions of OS X) with building ``lxml``, -you probably might need to use Homebrew_ to ``brew install libxml2``, -and invoke the install with:: + If you are having trouble on OS X Mavericks + (or possibly other versions of OS X) with building ``lxml``, + you probably might need to use Homebrew_ to ``brew install libxml2``, + and invoke the install with:: + + CFLAGS=-I/usr/local/opt/libxml2/include/libxml2 \ + LDFLAGS=-L/usr/local/opt/libxml2/lib \ + pip install -r requirements.txt - CFLAGS=-I/usr/local/opt/libxml2/include/libxml2 \ - LDFLAGS=-L/usr/local/opt/libxml2/lib \ - pip install -r requirements.txt - -On Ubuntu -~~~~~~~~~ + .. tab:: Ubuntu -Install:: + Install:: - sudo apt-get install build-essential - sudo apt-get install python-dev python-pip python-setuptools - sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev + sudo apt-get install build-essential + sudo apt-get install python-dev python-pip python-setuptools + sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev -If you don't have redis installed yet, you can do it with:: - - sudo apt-get install redis-server + If you don't have redis installed yet, you can do it with:: + + sudo apt-get install redis-server -On CentOS/RHEL 7 -~~~~~~~~~~~~~~~~ + .. tab:: CentOS/RHEL 7 -Install:: + Install:: - sudo yum install python-devel python-pip libxml2-devel libxslt-devel + sudo yum install python-devel python-pip libxml2-devel libxslt-devel -Other operating systems -~~~~~~~~~~~~~~~~~~~~~~~ + .. tab:: Other OS -On other operating systems no further dependencies are required, -or you need to find the proper equivalent libraries. + On other operating systems no further dependencies are required, + or you need to find the proper equivalent libraries. .. _Python 3.6: http://www.python.org/ diff --git a/requirements/pip.txt b/requirements/pip.txt index f477a4de6eb..e87adc8b2f2 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -5,6 +5,7 @@ virtualenv==16.0.0 docutils==0.14 Sphinx==1.7.8 sphinx_rtd_theme==0.4.1 +sphinx-tabs==1.1.7 # Required to avoid Transifex error with reserved slug # https://github.com/sphinx-doc/sphinx-intl/pull/27 git+https://github.com/agjohnson/sphinx-intl.git@7b5c66bdb30f872b3b1286e371f569c8dcb66de5#egg=sphinx-intl