setup.py: Always include develop dependencies on RTD

This commit is contained in:
Gina Häußge 2015-03-02 15:17:53 +01:00
parent cef4683082
commit db382e39a7
3 changed files with 21 additions and 8 deletions

View file

@ -1,3 +0,0 @@
sphinxcontrib-httpdomain
sphinxcontrib-napoleon
sphinx_rtd_theme

View file

@ -1,6 +1,12 @@
# Testing dependencies
mock>=1.0.1
nose>=1.3.0
sphinxcontrib-httpdomain
sphinx_rtd_theme
po2json
ddt
# Documentation dependencies
sphinxcontrib-httpdomain
sphinxcontrib-napoleon
sphinx_rtd_theme
# Translation dependencies
po2json

View file

@ -250,6 +250,10 @@ def get_cmdclass():
return cmdclass
def requirements(filename):
return filter(lambda line: line and not line.startswith("#"), map(lambda line: line.strip(), open(filename).read().split("\n")))
def params():
name = "OctoPrint"
version = versioneer.get_version()
@ -287,11 +291,17 @@ def params():
include_package_data = True
zip_safe = False
install_requires = open("requirements.txt").read().split("\n")
install_requires = requirements("requirements.txt")
extras_require = dict(
develop=open("requirements-dev.txt").read().split("\n")
develop=requirements("requirements-dev.txt")
)
if os.environ.get('READTHEDOCS', None) == 'True':
# we can't tell read the docs to please perform a pip install -e .[develop], so we help
# it a bit here by explicitely adding the development dependencies, which include our
# documentation dependencies
install_requires = install_requires + extras_require['develop']
entry_points = {
"console_scripts": [
"octoprint = octoprint:main"