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

Docs: make external packages optional #2162

Merged
merged 2 commits into from
Jan 20, 2024

Conversation

lmoureaux
Copy link
Contributor

@lmoureaux lmoureaux commented Jan 20, 2024

It was noted in #2155 that when packaging Freeciv21, sphinx_rtd_theme and sphinx_last_updated_by_git were needed at build time to create the man pages. The rtd theme is obviously only needed for HTML output and last_updated_by_git doesn't seem to be used with the man pages. Make them both optional by checking if they can be imported when evaluating the config.

This will allow package maintainers to ship man pages even if one of the two packages are missing from their distribution.

It was noted in longturn#2155 that when packaging Freeciv21, sphinx_rtd_theme and
sphinx_last_updated_by_git were needed at build time to create the man pages.
The rtd theme is obviously only needed for HTML output and last_updated_by_git
doesn't seem to be used with the man pages. Make them both optional by checking
if they can be imported when evaluating the config.

This will allow package maintainers to ship man pages even when one of the two
packages are missing from their distribution.
@lmoureaux lmoureaux force-pushed the bugfix/rtd-theme-optional branch from e9decb2 to f53d414 Compare January 20, 2024 17:23
@jwrober
Copy link
Collaborator

jwrober commented Jan 20, 2024

If you add /3/ to this, you can close #2154

https://github.com/longturn/freeciv21/blob/master/docs/conf.py#L221

@lmoureaux
Copy link
Contributor Author

Added fix for #2154

@jwrober jwrober self-requested a review January 20, 2024 21:10
@lmoureaux lmoureaux merged commit 453d13c into longturn:master Jan 20, 2024
20 checks passed
@lmoureaux lmoureaux deleted the bugfix/rtd-theme-optional branch January 20, 2024 23:16
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.

2 participants