10 Commits

Author SHA1 Message Date
Maxwell G 6448c33677 Update to 0.6.0. 2024-03-28 23:15:58 +00:00
Fedora Release Engineering aede73fbe2 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 06:31:37 +00:00
Maxwell G 6960c2d470 Add changelog entry 2023-12-22 02:04:33 +00:00
Maxwell G 96424c216f fix installation of license files
LICENSES/MIT.txt is now a symlink to `../LICENSE`.
2023-12-22 02:01:19 +00:00
Maxwell G 4e4ffd80d6 Update to 0.5.0. 2023-12-14 19:07:29 +00:00
Maxwell G bef7b2af65 Update to 0.3.0. 2023-09-06 23:01:51 -05:00
Fedora Release Engineering c7793d4462 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 16:33:45 +00:00
Python Maint d1e1018a12 Rebuilt for Python 3.12 2023-06-29 20:07:49 +02:00
Maxwell G 0d8ef94d06 Update to 0.1.2. 2023-05-20 23:10:24 +00:00
Maxwell G f55247ec9c use %pyproject_buildrequires -w on epel9 2023-05-13 20:34:17 +00:00
2 changed files with 97 additions and 20 deletions
+2 -2
View File
@@ -1,2 +1,2 @@
SHA512 (tomcli-0.1.1.tar.gz) = 4d35a2d1fea21f8a6040fa773a096c0f327d12d25e08a81498dd0fe4c1fc22192a7362bf1ab5cb2fbb4a7e29aa747dd80a3af4d321e1b66dc6e78f7bd12dfbb6
SHA512 (tomcli-0.1.1.tar.gz.asc) = 1c7e0e1b8f790ac6c5003eea44aabb40c03617a90210b10451646b222060291dce53b5b0d566aaab2c3c11d8b64f8c23bf693e63dc14a9af74fe39bcca07d178
SHA512 (tomcli-0.6.0.tar.gz) = 19aad51f0b0e8169e427aa4ded1437061377b82b3b00cc3b175bc92bcb1c359c09c7003630e9857694944d701ee6522b35a05a77223aa574afe9f7b03a6337ad
SHA512 (tomcli-0.6.0.tar.gz.asc) = b76684da7707dc7a25381f974a2d95702ea2e0ce18bbc5057372688da0fc2e0a2039199a70a3936e020336043c94ac0885c26944ff8e28622e94833a526b128a
+95 -18
View File
@@ -4,8 +4,33 @@
# 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}
%bcond manpages 1
# 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.1.1
Version: 0.6.0
Release: 1%{?dist}
Summary: CLI for working with TOML files. Pronounced "tom clee."
@@ -19,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
@@ -39,52 +68,100 @@ tomcli is a CLI for working with TOML files. Pronounced "tom clee."
%generate_buildrequires
%pyproject_buildrequires -x all,tomlkit,tomli,test
%{pyproject_buildrequires %{shrink:
-x tomli
%{?with_tomlkit:-x all,tomlkit}
%{?with_tests:-x test}
}}
%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 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}
TOMCLI="%{buildroot}%{_bindir}/tomcli"
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
%pyproject_extras_subpkg -n tomcli %{?with_tomlkit:all tomlkit} tomli
%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
%license LICENSE
%doc README.md
%doc NEWS.md
%{_bindir}/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 <maxwell@gtmx.me> - 0.6.0-1
- Update to 0.6.0.
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Dec 22 2023 Maxwell G <maxwell@gtmx.me> - 0.5.0-2
- Fix installation of license files
* 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.
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 0.1.2-2
- Rebuilt for Python 3.12
* Sat May 20 2023 Maxwell G <maxwell@gtmx.me> - 0.1.2-1
- Update to 0.1.2.
* Wed May 03 2023 Maxwell G <maxwell@gtmx.me> - 0.1.1-1
- Initial package. Closes rhbz#2186902.