Skip to content

Commit e1da0c9

Browse files
windows compatiblity (#76) [refer GitPython/issues/356]
* windows compatibility * changelog
1 parent ae1c230 commit e1da0c9

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ jobs:
9494
- os: macos-latest
9595
python-version: "3.10"
9696
toxenv: py310
97+
- os: windows-latest
98+
python-version: "3.10"
99+
toxenv: py310
97100
steps:
98101
- name: Check out repository
99102
uses: actions/checkout@v4

README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ sphinx-versioned-docs
1515
+-------------------------+-----------------------+
1616

1717
Sphinx extension that allows building versioned docs for self-hosting.
18-
Supported on Linux and macOS.
1918

2019
It works by producing docs for all(specified) branches in separate folders and injects a readthedocs-like version selector menu/badge.
2120

docs/changes/76.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adds windows compatibility.

tests/test_multicommit_injection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_file_content(ver, expected):
6161

6262
# Verify the contents of `example.html`, if expected
6363
data = None
64-
with open(OUTPATH / ver / file) as f:
64+
with open(OUTPATH / ver / file, encoding="utf8") as f:
6565
data = f.read()
6666
for content in content_to_verify.split():
6767
assert content in data
@@ -74,7 +74,7 @@ def test_injected_hyperlinks(ver, file):
7474
assert (OUTPATH / ver / file).is_file()
7575

7676
data = None
77-
with open(OUTPATH / ver / file) as f:
77+
with open(OUTPATH / ver / file, encoding="utf8") as f:
7878
data = f.read()
7979
soup = bs(data, features="html.parser")
8080
injected_code = soup.find_all(class_="injected")

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ commands =
2727

2828
# test a multi-commit repository with `sphinx_rtd_theme` and injection tests
2929
[testenv]
30+
# Windows compatibility GitPython/issues/356
31+
passenv = USERNAME
3032
changedir = .tmp/{envname}
3133
description = build `sphinx_rtd_theme` with prebuild for a multi-commit git-repo
3234
extras = tests

0 commit comments

Comments
 (0)