mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-12 12:33:02 +00:00
Backport PR #4303: make sure event-schemas are installed
This commit is contained in:

committed by
MeeseeksDev[bot]
![MeeseeksDev[bot]](/assets/img/avatar_default.png)
parent
193ebc970c
commit
3e608cfc38
@@ -2,19 +2,34 @@
|
||||
# Check that installed package contains everything we expect
|
||||
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import jupyterhub
|
||||
from jupyterhub._data import DATA_FILES_PATH
|
||||
|
||||
print("Checking jupyterhub._data")
|
||||
print(f"DATA_FILES_PATH={DATA_FILES_PATH}")
|
||||
assert os.path.exists(DATA_FILES_PATH), DATA_FILES_PATH
|
||||
print("Checking jupyterhub._data", end=" ")
|
||||
print(f"DATA_FILES_PATH={DATA_FILES_PATH}", end=" ")
|
||||
DATA_FILES_PATH = Path(DATA_FILES_PATH)
|
||||
assert DATA_FILES_PATH.is_dir(), DATA_FILES_PATH
|
||||
for subpath in (
|
||||
"templates/page.html",
|
||||
"static/css/style.min.css",
|
||||
"static/components/jquery/dist/jquery.js",
|
||||
"static/js/admin-react.js",
|
||||
):
|
||||
path = os.path.join(DATA_FILES_PATH, subpath)
|
||||
assert os.path.exists(path), path
|
||||
path = DATA_FILES_PATH / subpath
|
||||
assert path.is_file(), path
|
||||
|
||||
print("OK")
|
||||
|
||||
print("Checking package_data", end=" ")
|
||||
jupyterhub_path = Path(jupyterhub.__file__).parent.resolve()
|
||||
for subpath in (
|
||||
"alembic.ini",
|
||||
"alembic/versions/833da8570507_rbac.py",
|
||||
"event-schemas/server-actions/v1.yaml",
|
||||
):
|
||||
path = jupyterhub_path / subpath
|
||||
assert path.is_file(), path
|
||||
|
||||
print("OK")
|
||||
|
7
setup.py
7
setup.py
@@ -50,7 +50,12 @@ def get_package_data():
|
||||
(mostly alembic config)
|
||||
"""
|
||||
package_data = {}
|
||||
package_data['jupyterhub'] = ['alembic.ini', 'alembic/*', 'alembic/versions/*']
|
||||
package_data['jupyterhub'] = [
|
||||
'alembic.ini',
|
||||
'alembic/*',
|
||||
'alembic/versions/*',
|
||||
'event-schemas/*/*.yaml',
|
||||
]
|
||||
return package_data
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user