From 1d8984e9583b13c4dddcfa43f3af22a36012064b Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 13 Jul 2026 00:13:16 -0500 Subject: [PATCH 1/3] fix: complete the distros foo.spec example The example spec was a hollow stub with only a preamble and an empty %files section, while the chapter and slides walk through a full spec. Flesh it out to match the walked-through spec, including the %pyproject_buildrequires -x test fix from PR #46 so pytest is present in the buildroot for %check. Assisted-by: ClaudeCode:claude-opus-4-8 --- examples/5_04_distros/foo.spec | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/examples/5_04_distros/foo.spec b/examples/5_04_distros/foo.spec index 5862a44..2abea84 100644 --- a/examples/5_04_distros/foo.spec +++ b/examples/5_04_distros/foo.spec @@ -5,11 +5,30 @@ Summary: Example package License: Unlicense URL: https://example.com Source: %{pypi_source foo} +BuildRequires: python3-devel %description Lorem ipsum -%files +%prep +%autosetup -n foo-%{version} + +%generate_buildrequires +%pyproject_buildrequires -x test + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files foo + +%check +%pytest + +%files -f %{pyproject_files} +%license LICENSE +%doc README.md %changelog %autochangelog From bdeb6210dad387d6a3108a971c23bd1b774d6a2a Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 13 Jul 2026 00:13:16 -0500 Subject: [PATCH 2/3] fix: complete the distros foo.spec example The example spec was a hollow stub with only a preamble and an empty %files section, while the chapter and slides walk through a full spec. Flesh it out to match the walked-through spec, including the %pyproject_buildrequires -x test fix from PR #46 so pytest is present in the buildroot for %check. Assisted-by: ClaudeCode:claude-opus-4-8 --- examples/5_04_distros/foo.spec | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/examples/5_04_distros/foo.spec b/examples/5_04_distros/foo.spec index 5862a44..2abea84 100644 --- a/examples/5_04_distros/foo.spec +++ b/examples/5_04_distros/foo.spec @@ -5,11 +5,30 @@ Summary: Example package License: Unlicense URL: https://example.com Source: %{pypi_source foo} +BuildRequires: python3-devel %description Lorem ipsum -%files +%prep +%autosetup -n foo-%{version} + +%generate_buildrequires +%pyproject_buildrequires -x test + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files foo + +%check +%pytest + +%files -f %{pyproject_files} +%license LICENSE +%doc README.md %changelog %autochangelog From 7294e394c4af7affaa893e1b4452cfa97e076b66 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 13 Jul 2026 00:21:14 -0500 Subject: [PATCH 3/3] docs: literalinclude foo.spec in the distros chapter Now that #46 is merged, the chapter can include the example spec directly instead of carrying an inline copy, so the two cannot drift again. The Marp deck keeps its inline copy (no include mechanism). Assisted-by: ClaudeCode:claude-opus-4-8 --- content/other-tools/04_distros.md | 38 +++---------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/content/other-tools/04_distros.md b/content/other-tools/04_distros.md index 15766f6..fed5b02 100644 --- a/content/other-tools/04_distros.md +++ b/content/other-tools/04_distros.md @@ -27,41 +27,9 @@ If your project is not yet packaged, that's fine, you can do it yourself. The only files you need to manage are a `.spec` file and a `packit` configuration[^2]. The spec file can be quite minimal and low/no maintenance: -```rpmspec -Name: foo -Version: 0.0.0 -Release: %autorelease -Summary: Example package -License: Unlicense -URL: https://example.com -Source: %{pypi_source foo} -BuildRequires: python3-devel - -%description -Lorem ipsum - -%prep -%autosetup -n foo-%{version} - -%generate_buildrequires -%pyproject_buildrequires -x test - -%build -%pyproject_wheel - -%install -%pyproject_install -%pyproject_save_files foo - -%check -%pytest - -%files -f %{pyproject_files} -%license LICENSE -%doc README.md - -%changelog -%autochangelog +```{literalinclude} ../../examples/5_04_distros/foo.spec +:language: rpmspec +:caption: foo.spec ``` Packit is a service available as a GitHub app and on GitLab, but can be extended upon request.