diff options
| author | Toby Harradine <[email protected]> | 2018-08-13 17:49:40 +1000 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-08-22 21:57:27 -0400 |
| commit | dace5aeaeecc10f6c1bba9eda9f40eeb55b095a4 (patch) | |
| tree | c17e08785a99ff59edd7455318054c5bad478587 | |
| parent | Bot.unload_extension: don't remove commands from no module (diff) | |
| download | discord.py-dace5aeaeecc10f6c1bba9eda9f40eeb55b095a4.tar.xz discord.py-dace5aeaeecc10f6c1bba9eda9f40eeb55b095a4.zip | |
Move conditional RTD dependencies to 'docs' extra
| -rw-r--r-- | docs/conf.py | 8 | ||||
| -rw-r--r-- | setup.py | 16 |
2 files changed, 7 insertions, 17 deletions
diff --git a/docs/conf.py b/docs/conf.py index bc2aab17..a9c214f7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,8 +16,6 @@ import sys import os import re -on_rtd = os.getenv('READTHEDOCS') == 'True' - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -36,15 +34,11 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.extlinks', 'sphinx.ext.intersphinx', + 'sphinx.ext.napoleon', 'sphinxcontrib.asyncio', 'details' ] -if on_rtd: - extensions.append('sphinxcontrib.napoleon') -else: - extensions.append('sphinx.ext.napoleon') - autodoc_member_order = 'bysource' extlinks = { @@ -1,18 +1,10 @@ from setuptools import setup, find_packages -import re, os - -on_rtd = os.getenv('READTHEDOCS') == 'True' +import re requirements = [] with open('requirements.txt') as f: requirements = f.read().splitlines() -if on_rtd: - requirements.append('sphinx==1.7.4') - requirements.append('sphinxcontrib-napoleon') - requirements.append('sphinxcontrib-asyncio') - requirements.append('sphinxcontrib-websupport') - version = '' with open('discord/__init__.py') as f: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1) @@ -43,7 +35,11 @@ with open('README.rst') as f: extras_require = { 'voice': ['PyNaCl==1.1.2'], - 'docs': ['sphinxcontrib-asyncio'] + 'docs': [ + 'sphinx==1.7.4', + 'sphinxcontrib-asyncio', + 'sphinxcontrib-websupport', + ] } setup(name='discord.py', |