Skip to content

Commit 8ce7617

Browse files
committed
docs: borrow poetry version from docs/pyproject.toml
In order make docs build reproducible we need to lock poetry version. It will also help with pip cache invalidation on the pipeline, hash will be calculated from `docs/pyproject.toml`. Does two things: 1. Lock poetry version in `docs/pyproject.toml` 2. Pull version from `docs/pyproject.toml` in `Makefile`
1 parent 6c28ec0 commit 8ce7617

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

docs/Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,22 @@ all: dirhtml
1919
# Setup commands
2020
.PHONY: setupenv
2121
setupenv:
22-
pip install -q poetry
2322
sudo apt-get install gcc python3-dev libev4 libev-dev
23+
@while IFS= read -r line; do \
24+
if [[ "$${line}" =~ ^[[:space:]]*requires[[:space:]]*= ]]; then\
25+
content="$${line#*=}";\
26+
content="$${content//[[:space:]]/}";\
27+
content="$${content#[}";\
28+
content="$${content%]}";\
29+
IFS=',' read -ra items <<< "$$content";\
30+
for item in "$${items[@]}"; do\
31+
item="$${item%\"}";\
32+
item="$${item#\"}";\
33+
pip install "$$item";\
34+
done;\
35+
fi;\
36+
done < pyproject.toml
37+
2438

2539
.PHONY: setup
2640
setup:

docs/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ scylla-driver = { path = "../", develop = true }
2626

2727

2828
[build-system]
29-
requires = ["poetry>=1.8.0"]
29+
requires = ["poetry==2.2.0"]
3030
build-backend = "poetry.masonry.api"

0 commit comments

Comments
 (0)