Skip to content

Commit

Permalink
Compat with Sphinx 7.2's changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Aug 19, 2023
1 parent 230437c commit 6e8d81e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sphinxnotes/lilypond/__init__.py
Expand Up @@ -359,7 +359,10 @@ def read_source_file(env:BuildEnvironment, fn:str) -> str:
"""
if path.isabs(fn):
# Source dir absolute path to file system absolute path.
fn = env.srcdir + fn
#
# Since Sphinx 7.2, env.srcdir changes its type from str to pathlib.Path.
# See https://github.com/sphinx-doc/sphinx/pull/11526. TODO: use pathlib
fn = path.join(str(env.srcdir), fn)
else:
# Document relative path to file system absolute path.
fn = path.join(path.dirname(env.doc2path(env.docname)), fn)
Expand Down

0 comments on commit 6e8d81e

Please sign in to comment.