From 6448c336772d64cad698c6c92fceae7c477bdbb4 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Thu, 28 Mar 2024 23:15:07 +0000 Subject: [PATCH] Update to 0.6.0. --- sources | 4 ++-- tomcli.spec | 55 +++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/sources b/sources index 556fd38..16fe1f8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (tomcli-0.5.0.tar.gz) = cfe17923972e444b3219f1bd3f74cb40a79253284c9902ca3d397d592c27a1ac7f98e8a8fb57e7b9d9fa47a23d526be3055de55162bdce505f7a0b4c26f2b3dd -SHA512 (tomcli-0.5.0.tar.gz.asc) = 139ac7af2d8edc5094f390d7a3a138dd5a4562aec1b9a26653f6743714e0915e0b769b0b23dc4191312cedb53228e914af4d3a260b63d5539fbec2cf772bcd61 +SHA512 (tomcli-0.6.0.tar.gz) = 19aad51f0b0e8169e427aa4ded1437061377b82b3b00cc3b175bc92bcb1c359c09c7003630e9857694944d701ee6522b35a05a77223aa574afe9f7b03a6337ad +SHA512 (tomcli-0.6.0.tar.gz.asc) = b76684da7707dc7a25381f974a2d95702ea2e0ce18bbc5057372688da0fc2e0a2039199a70a3936e020336043c94ac0885c26944ff8e28622e94833a526b128a diff --git a/tomcli.spec b/tomcli.spec index e15083b..aff8a53 100644 --- a/tomcli.spec +++ b/tomcli.spec @@ -4,11 +4,22 @@ # SPDX-License-Identifier: MIT # License text: https://spdx.org/licenses/MIT.html +# bconds: +# tests +# Run unit tests +# tomlkit +# Enable tomlkit and all extras +# manpages +# Build manpages using scdoc +# bootstrap +# Disable tomlkit dependencies and unit tests. +# Add ~bootstrap to %%dist +# Allows tomcli to be built early in the new Python bootstrap process. + %bcond bootstrap 0 +%bcond tomlkit %{without bootstrap} %bcond tests %{without bootstrap} -%if %{with tests} && %{with bootstrap} -%{error:--with tests and --with bootstrap are mutually exclusive} -%endif +%bcond manpages 1 # Add minimal py3_test_envvars for EPEL 9 %if %{undefined py3_test_envvars} @@ -19,8 +30,8 @@ PATH=%{buildroot}%{_bindir}:${PATH} %endif Name: tomcli -Version: 0.5.0 -Release: 3%{?dist} +Version: 0.6.0 +Release: 1%{?dist} Summary: CLI for working with TOML files. Pronounced "tom clee." License: MIT @@ -33,14 +44,18 @@ Source2: https://meta.sr.ht/~gotmax23.pgp BuildArch: noarch BuildRequires: gnupg2 BuildRequires: python3-devel -BuildRequires: %{py3_dist pytest} +%if %{with manpages} +BuildRequires: scdoc +%endif # One of the TOML backends is required Requires: (%{py3_dist tomcli[tomlkit]} or %{py3_dist tomcli[tomli]}) +%if %{with tomlkit} # Prefer the tomlkit backend Suggests: %{py3_dist tomcli[tomlkit]} # Recommend the 'all' extra Recommends: %{py3_dist tomcli[all]} +%endif %description @@ -55,7 +70,7 @@ tomcli is a CLI for working with TOML files. Pronounced "tom clee." %generate_buildrequires %{pyproject_buildrequires %{shrink: -x tomli - %{!?with_bootstrap:-x all,tomlkit} + %{?with_tomlkit:-x all,tomlkit} %{?with_tests:-x test} }} @@ -63,15 +78,22 @@ tomcli is a CLI for working with TOML files. Pronounced "tom clee." %build %pyproject_wheel +%if %{with manpages} +for page in doc/*.scd; do + dest="${page%.scd}" + scdoc <"${page}" >"${dest}" +done +%endif + %install %pyproject_install %pyproject_save_files tomcli -mkdir -p %{buildroot}%{bash_completions_dir} -mkdir -p %{buildroot}%{fish_completions_dir} -mkdir -p %{buildroot}%{zsh_completions_dir} +# Install manpages +install -Dpm 0644 doc/*.1 -t %{buildroot}%{_mandir}/man1 +# Install shell completions ( export %{py3_test_envvars} %{python3} compgen.py \ @@ -86,12 +108,13 @@ export %{py3_test_envvars} # Smoke test ( export %{py3_test_envvars} +TOMCLI="%{buildroot}%{_bindir}/tomcli" cp pyproject.toml test.toml -name="$(tomcli-get test.toml project.name)" +name="$($TOMCLI get test.toml project.name)" test "${name}" = "tomcli" -tomcli-set test.toml str project.name not-tomcli -newname="$(tomcli-get test.toml project.name)" +$TOMCLI set test.toml str project.name not-tomcli +newname="$($TOMCLI get test.toml project.name)" test "${newname}" = "not-tomcli" ) @@ -101,7 +124,7 @@ test "${newname}" = "not-tomcli" %endif -%pyproject_extras_subpkg -n tomcli all tomli tomlkit +%pyproject_extras_subpkg -n tomcli %{?with_tomlkit:all tomlkit} tomli %files -f %{pyproject_files} @@ -112,9 +135,13 @@ test "${newname}" = "not-tomcli" %{bash_completions_dir}/tomcli* %{fish_completions_dir}/tomcli*.fish %{zsh_completions_dir}/_tomcli* +%{_mandir}/man1/tomcli*.1* %changelog +* Thu Mar 28 2024 Maxwell G - 0.6.0-1 +- Update to 0.6.0. + * Sat Jan 27 2024 Fedora Release Engineering - 0.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild