move static resources to share/jupyterhub

from share/jupyter/hub

to be consistent with use of etc/jupyterhub etc.
This commit is contained in:
Min RK
2018-02-20 11:11:18 +01:00
parent ec8d008678
commit 8695823165
28 changed files with 70 additions and 76 deletions

View File

@@ -18,15 +18,15 @@ graft docs
prune docs/node_modules prune docs/node_modules
# prune some large unused files from components # prune some large unused files from components
prune share/jupyter/hub/static/components/bootstrap/dist/css prune share/jupyterhub/static/components/bootstrap/dist/css
exclude share/jupyter/hub/static/components/bootstrap/dist/fonts/*.svg exclude share/jupyterhub/static/components/bootstrap/dist/fonts/*.svg
prune share/jupyter/hub/static/components/font-awesome/css prune share/jupyterhub/static/components/font-awesome/css
prune share/jupyter/hub/static/components/font-awesome/scss prune share/jupyterhub/static/components/font-awesome/scss
exclude share/jupyter/hub/static/components/font-awesome/fonts/*.svg exclude share/jupyterhub/static/components/font-awesome/fonts/*.svg
prune share/jupyter/hub/static/components/jquery/external prune share/jupyterhub/static/components/jquery/external
prune share/jupyter/hub/static/components/jquery/src prune share/jupyterhub/static/components/jquery/src
prune share/jupyter/hub/static/components/moment/lang prune share/jupyterhub/static/components/moment/lang
prune share/jupyter/hub/static/components/moment/min prune share/jupyterhub/static/components/moment/min
# Patterns to exclude from any directory # Patterns to exclude from any directory
global-exclude *~ global-exclude *~

View File

@@ -2,7 +2,7 @@
def get_data_files(): def get_data_files():
"""Walk up until we find share/jupyter/hub""" """Walk up until we find share/jupyterhub"""
import sys import sys
from os.path import join, abspath, dirname, exists, split from os.path import join, abspath, dirname, exists, split
path = abspath(dirname(__file__)) path = abspath(dirname(__file__))
@@ -12,10 +12,10 @@ def get_data_files():
for path in starting_points: for path in starting_points:
# walk up, looking for prefix/share/jupyter # walk up, looking for prefix/share/jupyter
while path != '/': while path != '/':
share_jupyter = join(path, 'share', 'jupyter', 'hub') share_jupyterhub = join(path, 'share', 'jupyterhub')
static = join(share_jupyter, 'static') static = join(share_jupyterhub, 'static')
if all(exists(join(static, f)) for f in ['components', 'css']): if all(exists(join(static, f)) for f in ['components', 'css']):
return share_jupyter return share_jupyterhub
path, _ = split(path) path, _ = split(path)
# didn't find it, give up # didn't find it, give up
return '' return ''

View File

@@ -263,7 +263,7 @@ class JupyterHub(Application):
).tag(config=True) ).tag(config=True)
data_files_path = Unicode(DATA_FILES_PATH, data_files_path = Unicode(DATA_FILES_PATH,
help="The location of jupyterhub data files (e.g. /usr/local/share/jupyter/hub)" help="The location of jupyterhub data files (e.g. /usr/local/share/jupyterhub)"
).tag(config=True) ).tag(config=True)
template_paths = List( template_paths = List(

View File

@@ -38,7 +38,7 @@ from setuptools.command.bdist_egg import bdist_egg
pjoin = os.path.join pjoin = os.path.join
here = os.path.abspath(os.path.dirname(__file__)) here = os.path.abspath(os.path.dirname(__file__))
share_jupyter = pjoin(here, 'share', 'jupyter', 'hub') share_jupyterhub = pjoin(here, 'share', 'jupyterhub')
static = pjoin(share_jupyter, 'static') static = pjoin(share_jupyter, 'static')
is_repo = os.path.exists(pjoin(here, '.git')) is_repo = os.path.exists(pjoin(here, '.git'))
@@ -53,7 +53,7 @@ def get_data_files():
data_files = [] data_files = []
ntrim = len(here + os.path.sep) ntrim = len(here + os.path.sep)
for (d, dirs, filenames) in os.walk(share_jupyter): for (d, dirs, filenames) in os.walk(share_jupyterhub):
data_files.append(( data_files.append((
d[ntrim:], d[ntrim:],
[ pjoin(d, f) for f in filenames ] [ pjoin(d, f) for f in filenames ]

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -18,4 +18,3 @@ div.error > p {
font-size: 200%; font-size: 200%;
line-height: normal; line-height: normal;
} }

View File

@@ -57,4 +57,3 @@
border-radius: 0 0 @border-radius-large @border-radius-large; border-radius: 0 0 @border-radius-large @border-radius-large;
} }
} }

View File

@@ -12,4 +12,3 @@
.hidden { .hidden {
display: none; display: none;
} }

View File

@@ -3,4 +3,3 @@
{% block error_detail %} {% block error_detail %}
<p>Jupyter has lots of moons, but this is not one...</p> <p>Jupyter has lots of moons, but this is not one...</p>
{% endblock %} {% endblock %}

View File

@@ -6,4 +6,3 @@
</p> </p>
</div> </div>
{% endblock %} {% endblock %}

View File

@@ -21,4 +21,3 @@
</div> </div>
{% endblock %} {% endblock %}