From d6182ec6ced28cd74558ea19e198896d1ed73b64 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 20 Mar 2024 13:30:04 +0100 Subject: [PATCH 1/4] Pin build to Python 3.10 Also make it possible to override it using the PYTHON make variable: $ make PYTHON="$HOME/bin/python3.10" Fixes #45 --- Makefile | 5 +++-- README.md | 4 ++++ requirements.txt | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 requirements.txt diff --git a/Makefile b/Makefile index c6a3012..a12b97b 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ SHELL := bash TARGET ?= origin # hpy static page and blog makefile # type `make help` to see all options +PYTHON := python3 all: build @@ -9,8 +10,8 @@ all: build venv_nikola/bin/nikola: ## create a virtualenv to build the website - @virtualenv -ppython3 ./venv_nikola - @venv_nikola/bin/python -mpip install nikola==8.2.2 markdown==3.2.2 jinja2 aiohttp watchdog ruamel.yaml feedparser + @virtualenv -p $(PYTHON) ./venv_nikola + @venv_nikola/bin/python -m pip install -r requirements.txt @venv_nikola/bin/nikola plugin -i sidebar @venv_nikola/bin/nikola plugin -i localsearch diff --git a/README.md b/README.md index 045c2c2..2198aa0 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,10 @@ behalf using the [GitHub OAuth](https://developer.github.com/v3/oauth/#web-application-flow) flow. Alternatively, users can comment on the GitHub issue directly. +## Build requirements + +Python 3.10 is required to build the web pages. + ## Deployment Any changes to the main branch (including merging PRs) regenerates and pushes diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b157ab4 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +aiohttp +feedparser +jinja2 +markdown==3.2.2 +nikola==8.2.2 +ruamel.yaml +watchdog From 0c12f9543ef4d1d225c30d3be15959fb105cd5e5 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 20 Mar 2024 13:46:59 +0100 Subject: [PATCH 2/4] Require Python 3.10 in CI --- .github/workflows/nikola.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nikola.yml b/.github/workflows/nikola.yml index 8f87d4c..66aba48 100644 --- a/.github/workflows/nikola.yml +++ b/.github/workflows/nikola.yml @@ -17,6 +17,9 @@ jobs: steps: - name: Check out uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v5 + python-version: '3.10' - name: Build docs shell: bash run: | From 5a6990b153b8ea346e5bd5b55bc1814eecbd1d62 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 20 Mar 2024 13:49:33 +0100 Subject: [PATCH 3/4] GHA syntax --- .github/workflows/nikola.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nikola.yml b/.github/workflows/nikola.yml index 66aba48..f212fe3 100644 --- a/.github/workflows/nikola.yml +++ b/.github/workflows/nikola.yml @@ -19,6 +19,7 @@ jobs: uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v5 + with: python-version: '3.10' - name: Build docs shell: bash From fecc8d4526096c5a108d80d35488f2cf9f0dc380 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Wed, 20 Mar 2024 13:57:16 +0100 Subject: [PATCH 4/4] Prettier wants double quotes --- .github/workflows/nikola.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nikola.yml b/.github/workflows/nikola.yml index f212fe3..2c27c3b 100644 --- a/.github/workflows/nikola.yml +++ b/.github/workflows/nikola.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Build docs shell: bash run: |