BUG: make _anim_rst windows compatible#1399
Merged
larsoner merged 1 commit intosphinx-gallery:masterfrom Nov 1, 2024
Merged
Conversation
larsoner
reviewed
Nov 1, 2024
sphinx_gallery/scrapers.py
Outdated
| video_uri = video.relative_to(gallery_conf["src_dir"]).as_posix() | ||
| # relative_to doesn't work on windows | ||
| # video_uri = video.relative_to(gallery_conf["src_dir"]).as_posix() | ||
| video_uri = os.path.relpath(video, gallery_conf["src_dir"]) |
Contributor
There was a problem hiding this comment.
I wouldn't expect this to work. This will have backslashes and URLs in HTML like the one in video below should have forward slashes, no? So there needs to be some posix-izing of the path.
Contributor
Author
There was a problem hiding this comment.
somehow the tests pass, maybe cause the paths end up consistent for each system? but yeah will update
a812091 to
7247621
Compare
larsoner
approved these changes
Nov 1, 2024
Contributor
larsoner
left a comment
There was a problem hiding this comment.
Last question -- have you checked that the resulting video actually works on Windows?
Contributor
Author
|
ran a make clean then make on tinybuild and the animation in the resulting doc works? |
Contributor
|
Sounds good, thanks @story645 ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes to using os.path.relpath cause on windows
Path.relative_toyields the following build errors: