You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue lies more with the larger ecosystem than with rst.linker, but it affects this project.
Since rst.linker takes as input the filenames to be linked, those filenames must be relative to something, either the project root or the cwd. But since these two things are often not the same due to readthedocs/readthedocs.org#890 and the fact that setup.py build_sphinx will typically build from the project root, there's no reliable relative directory from which to reference files.
As a result, rst.linker will fail with an error like
File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-6_7k_t6k/rst/linker.py", line 162, in write_links
with io.open(source, encoding='utf-8') as source:
FileNotFoundError: [Errno 2] No such file or directory: '../CHANGES.rst'
The text was updated successfully, but these errors were encountered:
I've discovered that although the API doesn't seem to expose the project dir nor the docs root, I can access a private attribute which will expose the conf file path, which is suitable for resolving files relative to that file:
This issue lies more with the larger ecosystem than with rst.linker, but it affects this project.
Since
rst.linker
takes as input the filenames to be linked, those filenames must be relative to something, either the project root or the cwd. But since these two things are often not the same due to readthedocs/readthedocs.org#890 and the fact thatsetup.py build_sphinx
will typically build from the project root, there's no reliable relative directory from which to reference files.As a result, rst.linker will fail with an error like
The text was updated successfully, but these errors were encountered: