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

Doc: updates to support building with upcoming update proj-docs Docker image updated to Ubuntu 24.04 #9784

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
apt update
apt install -y libproj-dev swig
python3 -m pip install -r doc/requirements.txt
python3 -m pip install numpy
python3 -m pip install numpy setuptools
pushd .
mkdir build
cd build
Expand All @@ -43,6 +43,14 @@ jobs:
-DOGR_BUILD_OPTIONAL_DRIVERS=OFF
cmake --build . -j$(nproc)
cmake --install .
# With the new ghcr.io/osgeo/proj-docs image based on Ubuntu 24.04
# a venv is activated. The above does not install the
# Python bindings into it (and the ones in the system are not found
# without overriding PYTHONPATH), so do it through pip install
cd swig/python
python3 setup.py sdist
cp dist/* /tmp/gdal.tar.gz
python3 -m pip install /tmp/gdal.tar.gz
ldconfig
popd

Expand Down
18 changes: 17 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,14 +429,30 @@
\fi
"""

# Package substitutefont no longer exists since TeXLive 2023 later than August 2023
# and has been replaced with sphinxpackagesubstitutefont
# https://github.com/jfbu/sphinx/commit/04cbd819b0e285d058549b2173af7efadf1cd020
import sphinx

if os.path.exists(
os.path.join(
os.path.dirname(sphinx.__file__), "texinputs", "sphinxpackagesubstitutefont.sty"
)
):
substitutefont_package = "sphinxpackagesubstitutefont"
else:
substitutefont_package = "substitutefont"

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
"preamble": preamble,
"inputenc": "\\usepackage[utf8]{inputenc}\n\\usepackage{CJKutf8}\n\\usepackage{substitutefont}",
"inputenc": "\\usepackage[utf8]{inputenc}\n\\usepackage{CJKutf8}\n\\usepackage{"
+ substitutefont_package
+ "}",
"babel": "\\usepackage[russian,main=english]{babel}\n\\selectlanguage{english}",
"fontenc": "\\usepackage[LGR,X2,T1]{fontenc}"
# Latex figure (float) alignment
Expand Down
Loading