1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 20:22:08 +00:00

JupyterHub: softcode getsite.py.j2 + resolve merge conflicts

This commit is contained in:
root 2021-09-01 14:37:36 -04:00
commit d6c69fecad
3 changed files with 18 additions and 6 deletions

View file

@ -59,16 +59,22 @@
src: jupyterhub.service.j2
dest: /etc/systemd/system/jupyterhub.service
- name: Install script from template to fix the async bug in firseuseauthenticator
- name: Install script from template, to fix the async bug in firseuseauthenticator
template:
src: patch_await.sh.j2
dest: "{{ jupyterhub_venv }}/bin/patch_await.sh"
mode: 0755
- name: "Now run it: {{ jupyterhub_venv }}/bin/patch_await.sh"
- name: Install {{ jupyterhub_venv }}/bin/getsite.py from template, to fetch the site_packages path
template:
src: getsite.py.j2
dest: "{{ jupyterhub_venv }}/bin/getsite.py"
mode: 0755
- name: "Run the above two, via: {{ jupyterhub_venv }}/bin/patch_await.sh"
command: "{{ jupyterhub_venv }}/bin/patch_await.sh"
- name: Install script from template to turn off the warning about http insecurity
- name: Install script from template, to turn off the warning about http insecurity
template:
src: patch-http-warning.sh.j2
dest: "{{ jupyterhub_venv }}/bin/patch_http-warning.sh"

View file

@ -0,0 +1,7 @@
#!{{ jupyterhub_venv }}/bin/python3
import site
for path in iter(site.getsitepackages()):
if path.find('site') != -1:
print(path)

View file

@ -1,10 +1,9 @@
#!/bin/bash -x
# add await to asyncio change password function
# SITE_PACKAGES=$({{ jupyterhub_venv }}/bin/python -m site | grep -v exist | grep site)
# SITE_PACKAGES=${SITE_PACKAGES:5:-2}
# SITE_PACKAGES=$({{ jupyterhub_venv }}/bin/python -m site | grep {{ jupyterhub_venv }} | grep /site-packages | cut -d\' -f2)
SITE_PACKAGES=$({{ jupyterhub_venv }}/bin/python -m site | grep {{ jupyterhub_venv }} | grep /site-packages | cut -d\' -f2)
SITE_PACKAGES=$({{ jupyterhub_venv }}/bin/getsite.py)
file=$SITE_PACKAGES/firstuseauthenticator/firstuseauthenticator.py
# file={{ jupyterhub_venv }}/lib/python{{ python_ver }}/site-packages/firstuseauthenticator/firstuseauthenticator.py