From fed1293ed8c38c76f430f1794dc12a114c216076 Mon Sep 17 00:00:00 2001 From: Patrick Gerken Date: Mon, 16 Jun 2025 23:23:58 +0200 Subject: [PATCH 1/2] Modernize Python dependency management - Migrate from requirements.txt to pyproject.toml - Update GitHub Actions to use pip install -e . - Add proper project metadata and dependencies - Maintain Python 3.11+ compatibility for CI This modernizes the project's dependency management while ensuring backward compatibility with existing CI workflows. --- .../workflows/build_files_as_test_python.yml | 2 +- pyproject.toml | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml diff --git a/.github/workflows/build_files_as_test_python.yml b/.github/workflows/build_files_as_test_python.yml index 52eac85..de479e9 100644 --- a/.github/workflows/build_files_as_test_python.yml +++ b/.github/workflows/build_files_as_test_python.yml @@ -19,7 +19,7 @@ jobs: ./bin/python -m pip install --upgrade pip wheel - name: Install dependencies run: | - ./bin/pip install -r requirements.txt + ./bin/pip install -e . - name: Build run: | ./bin/lektor build -f webpack diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0c5f9da --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[project] +name = "do3ccblog" +version = "0.1.0" +description = "Patrick's personal blog built with Lektor - texts and presentations about Python, web development, and tech" +readme = "README.md" +requires-python = ">=3.11" +dependencies = [ + "lektor>=3.3.11", + "lektor-markdown-highlighter>=0.3.2", + "lektor-atom>=0.4", + "lektor-webpack-support>=0.6", +] + +[project.optional-dependencies] +dev = [ + "pip-tools>=7.4.1", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/blog"] From 7d1954acec363f60e3356117bdfc2b50cf6f4364 Mon Sep 17 00:00:00 2001 From: Patrick Gerken Date: Mon, 16 Jun 2025 23:34:06 +0200 Subject: [PATCH 2/2] Fix missing README.md reference in pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0c5f9da..292d9b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,6 @@ name = "do3ccblog" version = "0.1.0" description = "Patrick's personal blog built with Lektor - texts and presentations about Python, web development, and tech" -readme = "README.md" requires-python = ">=3.11" dependencies = [ "lektor>=3.3.11",