Skip to content

Commit ad7ddb5

Browse files
committed
Merge branch 'fix/143/windows-ci' of https://github.com/foster999/jupyter-sphinx into fix/143/windows-ci
2 parents 6376e33 + 5d11210 commit ad7ddb5

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
python-version: [3.5, 3.6, 3.7, 3.8]
11+
python-version: [3.6, 3.7, 3.8]
1212
os: [ubuntu-latest]
1313
include:
1414
- os: windows-latest

jupyter_sphinx/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,20 @@ def build_finished(app, env):
122122
if app.builder.format != "html":
123123
return
124124

125-
module_path = Path(__file__)
126-
outdir_path = Path(app.outdir)
125+
module_dir = Path(__file__).parent
126+
outdir = Path(app.outdir)
127127

128128
# Copy stylesheet
129-
src = module_path / "css"
130-
dst = outdir_path / "_static"
129+
src = module_dir / "css"
130+
dst = outdir / "_static"
131131
copy_asset(src, dst)
132132

133133
thebe_config = app.config.jupyter_sphinx_thebelab_config
134134
if not thebe_config:
135135
return
136136

137137
# Copy all thebelab related assets
138-
src = module_path / "thebelab"
138+
src = module_dir / "thebelab"
139139
copy_asset(src, dst)
140140

141141

jupyter_sphinx/thebelab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def add_thebelab_library(doctree, env):
9898
return
9999

100100
try:
101-
thebe_config = json.load(filename.read_bytes())
101+
thebe_config = json.loads(filename.read_text())
102102
except ValueError:
103103
js.logger.warning(
104104
"The supplied thebelab configuration file is not in JSON format."

jupyter_sphinx/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ def sphinx_abs_dir(env, *paths):
8181
# Can't get relative path between drives on Windows
8282
return out_path.as_posix()
8383

84-
return "/" + out_path.relative_to(env.app.srcdir).as_posix()
84+
# Path().relative_to() doesn't work when not a direct subpath
85+
return "/" + os.path.relpath(out_path, env.app.srcdir)
8586

8687

8788
def output_directory(env):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@
3434
"nbconvert>=5.5",
3535
"nbformat",
3636
],
37-
python_requires=">= 3.5",
37+
python_requires=">= 3.6",
3838
package_data={"jupyter_sphinx": ["thebelab/*", "css/*"]},
3939
)

0 commit comments

Comments
 (0)