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

allow documentation build using hawkmoth from source tree #204

Merged
merged 3 commits into from
Oct 23, 2023
Merged

Conversation

jnikula
Copy link
Owner

@jnikula jnikula commented Oct 22, 2023

Address #203 while also using the installed package for CI and testing. Best of both worlds?

Unify with the CI check in makefile.yml instead of calling sphinx-build
directly here.
Preserve SPHINXOPTS for having non-empty defaults in upcoming changes,
and use O make variable for things that are only set on the
command-line.
For the purposes of testing and CI, it's preferrable to use the package
as it is installed instead of directly from source. See commits
9ad923e ("build: actually package hawkmoth.ext.*") and f8421b1
("move source under src/").

However, sometimes it's convenient to use the extension from the source
tree for the documentation build, instead of forcing the use of a
virtual environment.

Add src/ in Python path when usage of installed package is not
explicitly required and we're not on Read the Docs. Use the
'use-installed-hawkmoth' Sphinx tag for the former, and set it in
SPHINXOPTS by default for 'make html'. The Read the Docs config also
installs the package, so we can use that.

Direct sphinx-build will use the extension from source, as will 'make
SPHINXOPTS="" html'.

Fixes: #203
Copy link
Collaborator

@BrunoMSantos BrunoMSantos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jnikula jnikula merged commit 4bb5a6f into master Oct 23, 2023
5 checks passed
@jnikula jnikula deleted the doc-build branch October 23, 2023 10:52
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.

None yet

2 participants