Build with Poetry¶
Build the documentation shown here with poetry install
under build.jobs
.
It’s using the official and recommended way to install Poetry on Linux.
See https://python-poetry.org/docs/#osx–linux–bashonwindows-install-instructions
pyproject.toml¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | [tool.poetry] name = "test-builds" version = "0.1.0" description = "Experiments with Read the Docs' build system" authors = ["Manuel Kaufmann <humitos@gmail.com>"] license = "MIT" [tool.poetry.dependencies] python = "^3.10" Sphinx = "^5.0.2" sphinx-autorun = "^1.1.1" [tool.poetry.dev-dependencies] [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" |
.readthedocs.yaml¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | version: 2 build: os: "ubuntu-22.04" tools: python: "3.10" jobs: post_create_environment: # Install poetry # https://python-poetry.org/docs/#installing-manually - pip install poetry # Tell poetry to not use a virtual environment - poetry config virtualenvs.create false # Install project's dependencies - poetry install sphinx: configuration: docs/conf.py |
Sphinx configuration file used to build this docs (see full file),
docs/conf.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # -*- coding: utf-8 -*- # Default settings project = 'Test Builds' extensions = [ 'sphinx_autorun', ] latex_engine = 'xelatex' # allow us to build Unicode chars # Include all your settings here html_theme = 'sphinx_rtd_theme' |
>>> # Build at
>>> import datetime
>>> datetime.datetime.utcnow() # UTC
datetime.datetime(2022, 11, 22, 11, 15, 19, 417063)