Update to 0.5.0.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
SHA512 (tomcli-0.3.0.tar.gz) = 1fb1f89828971d07972a5f55c42335f1f0a8c78686616a1310ba9bc722fc3b6650ed8019ef91941e21c781b74b723ca9107f6e1b7e61639de6660897f841e5bd
|
||||
SHA512 (tomcli-0.3.0.tar.gz.asc) = c4aef343865fa396b2e6d5f8ad93207abeaed0426024e7513d286cdab553afa0bd0b274f85b288b4e02852ab0daf2e7c7fade81485077d5c6415a62fdbeb3831
|
||||
SHA512 (tomcli-0.5.0.tar.gz) = cfe17923972e444b3219f1bd3f74cb40a79253284c9902ca3d397d592c27a1ac7f98e8a8fb57e7b9d9fa47a23d526be3055de55162bdce505f7a0b4c26f2b3dd
|
||||
SHA512 (tomcli-0.5.0.tar.gz.asc) = 139ac7af2d8edc5094f390d7a3a138dd5a4562aec1b9a26653f6743714e0915e0b769b0b23dc4191312cedb53228e914af4d3a260b63d5539fbec2cf772bcd61
|
||||
|
||||
+44
-12
@@ -4,8 +4,22 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# License text: https://spdx.org/licenses/MIT.html
|
||||
|
||||
%bcond bootstrap 0
|
||||
%bcond tests %{without bootstrap}
|
||||
%if %{with tests} && %{with bootstrap}
|
||||
%{error:--with tests and --with bootstrap are mutually exclusive}
|
||||
%endif
|
||||
|
||||
# Add minimal py3_test_envvars for EPEL 9
|
||||
%if %{undefined py3_test_envvars}
|
||||
%define py3_test_envvars %{shrink:
|
||||
PYTHONPATH=%{buildroot}%{python3_sitelib}
|
||||
PATH=%{buildroot}%{_bindir}:${PATH}
|
||||
}
|
||||
%endif
|
||||
|
||||
Name: tomcli
|
||||
Version: 0.3.0
|
||||
Version: 0.5.0
|
||||
Release: 1%{?dist}
|
||||
Summary: CLI for working with TOML files. Pronounced "tom clee."
|
||||
|
||||
@@ -39,7 +53,11 @@ tomcli is a CLI for working with TOML files. Pronounced "tom clee."
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -x all,tomlkit,tomli,test %{?el9:-w}
|
||||
%{pyproject_buildrequires %{shrink:
|
||||
-x tomli
|
||||
%{!?with_bootstrap:-x all,tomlkit}
|
||||
%{?with_tests:-x test}
|
||||
}}
|
||||
|
||||
|
||||
%build
|
||||
@@ -55,27 +73,38 @@ mkdir -p %{buildroot}%{fish_completions_dir}
|
||||
mkdir -p %{buildroot}%{zsh_completions_dir}
|
||||
|
||||
(
|
||||
export PYTHONPATH="%{buildroot}%{python3_sitelib}"
|
||||
export _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1
|
||||
for command in %{buildroot}%{_bindir}/tomcli*; do
|
||||
$command --show-completion=bash > "%{buildroot}%{bash_completions_dir}/$(basename $command)"
|
||||
$command --show-completion=fish > "%{buildroot}%{fish_completions_dir}/$(basename $command).fish"
|
||||
$command --show-completion=zsh > "%{buildroot}%{zsh_completions_dir}/_$(basename $command)"
|
||||
done
|
||||
export %{py3_test_envvars}
|
||||
%{python3} compgen.py \
|
||||
--installroot %{buildroot} \
|
||||
--bash-dir %{bash_completions_dir} \
|
||||
--fish-dir %{fish_completions_dir} \
|
||||
--zsh-dir %{zsh_completions_dir}
|
||||
)
|
||||
|
||||
|
||||
%check
|
||||
# Smoke test
|
||||
(
|
||||
export %{py3_test_envvars}
|
||||
cp pyproject.toml test.toml
|
||||
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)"
|
||||
test "${newname}" = "not-tomcli"
|
||||
)
|
||||
|
||||
%pyproject_check_import
|
||||
%if %{with tests}
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
|
||||
%pyproject_extras_subpkg -n tomcli all tomli tomlkit
|
||||
|
||||
|
||||
%files -f %{pyproject_files}
|
||||
# I prefer not to rely on %%pyproject_save_files to mark files with %%license.
|
||||
# Also, Fedora's hatchling supports the current draft of PEP 639, but EPEL 9's
|
||||
# does not.
|
||||
%license LICENSES/*.txt
|
||||
%doc README.md
|
||||
%doc NEWS.md
|
||||
@@ -86,6 +115,9 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 14 2023 Maxwell G <maxwell@gtmx.me> - 0.5.0-1
|
||||
- Update to 0.5.0.
|
||||
|
||||
* Thu Sep 07 2023 Maxwell G <maxwell@gtmx.me> - 0.3.0-1
|
||||
- Update to 0.3.0.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user