From d2b033519c88417037387c9b867e1bab6f63a08b Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Thu, 14 Dec 2023 17:05:06 +0000 Subject: [PATCH] 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 --- .readthedocs.yaml | 7 +++---- doc/{setup.py => rtd_build.py} | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) rename doc/{setup.py => rtd_build.py} (97%) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 57725377..50b87b49 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -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 diff --git a/doc/setup.py b/doc/rtd_build.py similarity index 97% rename from doc/setup.py rename to doc/rtd_build.py index cf384f2e..bbca8da2 100644 --- a/doc/setup.py +++ b/doc/rtd_build.py @@ -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