Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed paths to work with build tools #82

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaximilianSoerenPollak
Copy link

@MaximilianSoerenPollak MaximilianSoerenPollak commented Dec 6, 2024

This is the second 'split' PR that was discussed for splitting the big one into smaller ones. This one here #80

This PR just fixes the pathing in the library, making it work with other systems that expect a more modern approach than the one with setup tools (which is not needed anymore since python 3.3) that was used.
Setuptools was a necessary change in this PR as otherwise the tests will not work, due to failing pip install .

fixes #79


**Note: I need some help on this PR, as I run into a small problem. I uploaded the noxtest.py as well so you can see how I tested this change. **

When I run nox with this the outcome is as follows:

nox > Session tests-3.12(sphinx='7.4.1') was successful.
nox > Running session lint
nox > Missing interpreters will error by default on CI systems.
nox > Session lint skipped: Python interpreter 3.9 not found.
nox > Running session linkcheck
nox > Missing interpreters will error by default on CI systems.
nox > Session linkcheck skipped: Python interpreter 3.9 not found.
nox > Ran multiple sessions:
nox > * tests-3.10(sphinx='7.1.2'): failed
nox > * tests-3.10(sphinx='7.2.5'): failed
nox > * tests-3.10(sphinx='7.4.1'): success
nox > * tests-3.11(sphinx='7.1.2'): skipped
nox > * tests-3.11(sphinx='7.2.5'): skipped
nox > * tests-3.11(sphinx='7.4.1'): skipped
nox > * tests-3.12(sphinx='7.1.2'): failed
nox > * tests-3.12(sphinx='7.2.5'): failed
nox > * tests-3.12(sphinx='7.4.1'): success
nox > * lint: skipped
nox > * linkcheck: skipped

For Sphinx 7.4.1 it works fine and has no issues but the other two versions fail. With this error:

FAILED tests/test_custom_template.py::test_custom_utf8_template[test_app0] - sphinx.errors.ThemeError: An error happened in rendering the page index.
FAILED tests/test_custom_template.py::test_custom_koi8_template[test_app0] - sphinx.errors.ThemeError: An error happened in rendering the page index.
FAILED tests/test_custom_template.py::test_custom_template[test_app0] - sphinx.errors.ThemeError: An error happened in rendering the page index.

Some more context:

E           sphinx.errors.ThemeError: An error happened in rendering the page index.
E           Reason: TemplateNotFound("'about.html' not found in ['/tmp/tmpxvaxwngv/custom_tr_template/_templates', '/home/maxi/tmp/testing/sphinx-test-reports/.nox/tests-3-12-sphinx-7-2-5/lib/python3.12/site-packages/sphinx/themes/basic']")

This always seems to stem from the tests/test_custom_template.py file. All of the app.build() calls there fail due to this same error.

I'm not sure how to fix this as I can't find the 'about.html' anywhere in the project?

Let me know if you have any more insight or need some more information from my side to triage this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setuptools missing as dependency
1 participant