Skip to content

Commit

Permalink
Fix RTD build failures (#600)
Browse files Browse the repository at this point in the history
* MAINT: pin maximum jinja2 version

* MAINT: only pin max jinja2 version on RDT and include reference to issue

* MAINT: import deps from requirements.txt in setuptools installer

* MAINT: fix declaration of deps pinned to git repo commits

* FIX: typo in RTD deps

* CLN: strip whitespace from dep strings when parsing from requirements.txt

* MAINT: fix jupyterhub deps

* MAINT: declare deps completely separately between RTD and normal builds
  • Loading branch information
flongford committed Apr 14, 2022
1 parent 15c24cb commit 2f6e719
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
8 changes: 5 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
setuptools==21.0
traitlets>=4.1
tornado==5.1.1
# Fix to 2.10.0 due to docker-py needs (fails with 2.11.1)
requests==2.10.0
# We want 1.8 because 1.10 uses API version 1.24 and the docker server
# on ubuntu uses 1.23, so they don't like each other.
docker-py==1.8
escapism==0.0.1
# Pinned to 0.8.0.dev0 due to issues with spawners (fails with 0.8.0)
git+http://github.com/jupyterhub/jupyterhub.git@2d1a45f0190059ef436c2f97dc8d6e391eb2d139#egg=jupyterhub
# Pinned to jupyterhub 0.8.0.dev0 due to issues with spawners (fails with 0.8.0)
jupyterhub @ git+http://github.com/jupyterhub/jupyterhub.git@2d1a45f0190059ef436c2f97dc8d6e391eb2d139#egg=jupyterhub
jupyter_client==4.3.0
click==6.6
tabulate==0.7.5
git+http://github.com/simphony/tornado-webapi.git@8b6846faae23657a04cf97ca5229ce8ea083d000#egg=tornadowebapi
tornadowebapi @ git+http://github.com/simphony/tornado-webapi.git@8b6846faae23657a04cf97ca5229ce8ea083d000#egg=tornadowebapi
# Pinned to 0.10.0 since 0.11.0 does not seem to be compatible with jupyterhub 0.7.x
oauthenticator==0.10.0
jinja2>=2.8
39 changes: 21 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@ def write_version_py():

write_version_py()

requirements = [
"setuptools>=21.0",
"traitlets>=4.1",
"tornado>=4.3",
"requests>=2.10.0",
"escapism>=0.0.1",
"jinja2>=2.8",
"jupyter_client>=4.3.0",
"click>=6.6",
"tabulate>=0.7.5",
"oauthenticator>=0.5",
]

# Unfortunately RTD cannot install jupyterhub because jupyterhub needs bower,
# and that is not available. We prevent the request for the unreleased jhub
# by skipping it if we are on RTD
Expand All @@ -46,12 +33,28 @@ def write_version_py():
if on_rtd:
# These are the dependencies of jupyterhub that we need to have in order
# for our code to import on RTD.
requirements.extend(["sqlalchemy>=1.0"])
requirements = [
"setuptools>=21.0",
"traitlets>=4.1",
"tornado>=4.3",
"requests>=2.10.0",
"escapism>=0.0.1",
"jupyter_client>=4.3.0",
"click>=6.6",
"tabulate>=0.7.5",
"oauthenticator>=0.5",
"sqlalchemy>=1.0",
# Pinning jinja2 requirements when building on RTD due to
# regression when using old versions of sphinx<2
# https://github.com/readthedocs/readthedocs.org/issues/9037
"jinja2<3.1.0",
]
else:
requirements.extend([
"jupyterhub>0.7",
"docker-py==1.8",
"tornadowebapi>=0.5.0"])
with open('requirements.txt', 'r') as REQUIREMENTS:
requirements = [
line.strip() for line in REQUIREMENTS.readlines()
if not line.startswith('#')
]


class install(_install):
Expand Down

0 comments on commit 2f6e719

Please sign in to comment.