Skip to content

Commit 9162b9b

Browse files
committed
Use Poetry properly with ReadTheDocs build jobs
- Remove requirements.txt approach - Use post_create_environment to install Poetry - Use post_install to install dependencies with Poetry - This is the recommended approach for Poetry on ReadTheDocs
1 parent f84f69c commit 9162b9b

2 files changed

Lines changed: 9 additions & 186 deletions

File tree

.readthedocs.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ build:
99
os: ubuntu-22.04
1010
tools:
1111
python: "3.11"
12+
jobs:
13+
post_create_environment:
14+
# Install poetry
15+
- pip install poetry
16+
# Tell poetry to not use a virtual environment
17+
- poetry config virtualenvs.create false
18+
post_install:
19+
# Install dependencies with Poetry
20+
- poetry install --with dev
1221

1322
# Build documentation with MkDocs
1423
mkdocs:
@@ -17,9 +26,3 @@ mkdocs:
1726

1827
# Optionally build your docs in additional formats such as PDF and ePub
1928
formats: all
20-
21-
python:
22-
install:
23-
- requirements: docs/requirements.txt
24-
- method: pip
25-
path: .

docs/requirements.txt

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)