sethfischer / sphinxcontrib-cadquery

Sphinx extension for rendering CadQuery models with VTK.js.
https://sphinxcontrib-cadquery.readthedocs.io/
Other
1 stars 0 forks source link

Incorrect Sphinx version used during RTD build #2

Closed sethfischer closed 1 year ago

sethfischer commented 1 year ago

Build 19088114 is expected to use Sphinx 5.3.0, rather it uses Sphinx 6.1.1.

rtd-build-19088114.txt

Build 19088114 uses Poetry to install dependencies with a post_create_environment user-defined job, in a manner recommended by RTD.

As expected poetry install installs Sphinx 5.3.0. This is confirmed with poetry show sphinx in post_create_environment.

However, when the following is run by RTD:

/home/docs/checkouts/readthedocs.org/user_builds/sphinxcontrib-cadquery/envs/1/bin/python -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html

The output shows that Sphinx 6.1.1 is being used:

Running Sphinx v6.1.1
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
writing output...
⋮

.readthedocs.yaml:

version: 2

build:
  os: ubuntu-20.04
  tools:
    nodejs: "19"
    python: "3.9"
  jobs:
    post_create_environment:
      # install Poetry
      - pip install poetry
      - poetry config virtualenvs.create false
      # install Python dependencies
      - poetry install
      - poetry show sphinx
    post_install:
      # install Node.js dependencies
      - npm clean-install
      # build
      - npm run build

sphinx:
  configuration: docs/conf.py
sethfischer commented 1 year ago

readthedocs/readthedocs.org/issues/9869

sethfischer commented 1 year ago

Moving poetry install from build.jobs.post_create_environment to post_install resolved the issue.

Build #19097755

version: 2

build:
  os: ubuntu-20.04
  tools:
    nodejs: "19"
    python: "3.9"
  jobs:
    post_create_environment:
      - pip install poetry
      - poetry config virtualenvs.create false
    post_install:
      - poetry install
      - npm clean-install
      - make npm-build

sphinx:
  configuration: docs/conf.py
sethfischer commented 1 year ago

https://github.com/readthedocs/readthedocs.org/pull/9879