doc: call Python build script as a pre_build job

RTD now supports adding extra commands [1] as jobs to run during
different parts of the build stage. This can be used to call the Python
build script instead of (ab)using RTD's setup.py support.

[1]: https://docs.readthedocs.io/en/stable/config-file/v2.html#build-jobs
This commit is contained in:
Maxwell G 2023-12-14 17:05:06 +00:00 committed by amatej
parent 5b81b10d20
commit d2b033519c
2 changed files with 3 additions and 6 deletions

View File

@ -6,14 +6,13 @@ build:
- swig
tools:
python: "3.11"
jobs:
pre_build:
- python doc/rtd_build.py
python:
install:
- requirements: doc/requirements.txt
# the 'setuptools' method calls doc/setup.py that configures files and runs doxygen
# the 'pip' method doesn't work this way
- method: setuptools
path: doc
sphinx:
builder: html

View File

@ -74,5 +74,3 @@ generate_bindings_from_dir(os.path.join(
generate_bindings_from_dir(os.path.join(DIR + "/../bindings/libdnf5_cli"),
os.path.join(DIR + "/../bindings/python3/libdnf5_cli"))
# no setup() is called
# this file only configures files for building docs in Read the Docs