diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3d57c0..a6dbe39 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,6 +94,9 @@ jobs: - os: macos-latest python-version: "3.10" toxenv: py310 + - os: windows-latest + python-version: "3.10" + toxenv: py310 steps: - name: Check out repository uses: actions/checkout@v4 diff --git a/README.rst b/README.rst index 6502309..1ede29a 100644 --- a/README.rst +++ b/README.rst @@ -15,7 +15,6 @@ sphinx-versioned-docs +-------------------------+-----------------------+ Sphinx extension that allows building versioned docs for self-hosting. -Supported on Linux and macOS. It works by producing docs for all(specified) branches in separate folders and injects a readthedocs-like version selector menu/badge. diff --git a/docs/changes/76.feature.rst b/docs/changes/76.feature.rst new file mode 100644 index 0000000..4b98f4a --- /dev/null +++ b/docs/changes/76.feature.rst @@ -0,0 +1 @@ +Adds windows compatibility. diff --git a/tests/test_multicommit_injection.py b/tests/test_multicommit_injection.py index 6a9e033..9ad14bb 100644 --- a/tests/test_multicommit_injection.py +++ b/tests/test_multicommit_injection.py @@ -61,7 +61,7 @@ def test_file_content(ver, expected): # Verify the contents of `example.html`, if expected data = None - with open(OUTPATH / ver / file) as f: + with open(OUTPATH / ver / file, encoding="utf8") as f: data = f.read() for content in content_to_verify.split(): assert content in data @@ -74,7 +74,7 @@ def test_injected_hyperlinks(ver, file): assert (OUTPATH / ver / file).is_file() data = None - with open(OUTPATH / ver / file) as f: + with open(OUTPATH / ver / file, encoding="utf8") as f: data = f.read() soup = bs(data, features="html.parser") injected_code = soup.find_all(class_="injected") diff --git a/tox.ini b/tox.ini index dba83f0..4b6078c 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,8 @@ commands = # test a multi-commit repository with `sphinx_rtd_theme` and injection tests [testenv] +# Windows compatibility GitPython/issues/356 +passenv = USERNAME changedir = .tmp/{envname} description = build `sphinx_rtd_theme` with prebuild for a multi-commit git-repo extras = tests