18 Commits

Author SHA1 Message Date
Python Maint 8127ca62b3 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 14:59:56 +02:00
Python Maint 8ce5e57d87 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 15:20:19 +02:00
Maxwell G a429c5fbce Update to 0.10.1. 2025-07-31 18:40:40 -05:00
Fedora Release Engineering e756a361a1 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 19:25:59 +00:00
Maxwell G a58c24902f Update to 0.10.0. 2025-06-06 13:54:34 -05:00
Python Maint 0d59230633 Rebuilt for Python 3.14 2025-06-03 08:54:23 +02:00
Maxwell G 9fab598d4c Update to 0.9.0. 2025-03-02 11:48:05 -06:00
Fedora Release Engineering a296315a12 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 13:05:11 +00:00
Maxwell G 9ab94fbf10 Update to 0.8.0. 2024-09-15 23:01:04 -05:00
Maxwell G 7b1299607c Update to 0.7.0. 2024-08-27 21:56:46 -05:00
Yaakov Selkowitz 0b1760abe6 Disable tomlkit and manpages on RHEL
tomcli has recently appeared as a potential build dependency for ELN
packages. It is unclear at this point whether tomcli will end up as a
required dependency for RHEL 11, but if it does, it will likely be with
minimal dependencies.  tomli-w is already in RHEL, but tomlkit is not, nor
is scdoc for the manpages.  If it ends up in EPEL instead (as it may
already for 10), then the extra dependencies are not a concern.

Also, some fixes are needed when manpages are disabled.
2024-07-22 22:41:35 +00:00
Fedora Release Engineering d35de8653f Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 07:40:41 +00:00
Python Maint 80416c604d Rebuilt for Python 3.13 2024-06-08 01:15:37 +02:00
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
2 changed files with 126 additions and 21 deletions
+2 -2
View File
@@ -1,2 +1,2 @@
SHA512 (tomcli-0.3.0.tar.gz) = 1fb1f89828971d07972a5f55c42335f1f0a8c78686616a1310ba9bc722fc3b6650ed8019ef91941e21c781b74b723ca9107f6e1b7e61639de6660897f841e5bd
SHA512 (tomcli-0.3.0.tar.gz.asc) = c4aef343865fa396b2e6d5f8ad93207abeaed0426024e7513d286cdab553afa0bd0b274f85b288b4e02852ab0daf2e7c7fade81485077d5c6415a62fdbeb3831
SHA512 (tomcli-0.10.1.tar.gz) = 5e41665f74cae42feab53b23268a5ff9bcc77a32e7ea6a23e8b5758495aad304e5addf3f82b5e9d6553221db6788d0bf378eccb1908d40a375ba34b8a9565b95
SHA512 (tomcli-0.10.1.tar.gz.asc) = 138230ab12d1f32978752b4aa1547bb13b30536a6868bad2c64bbbe610e55f012f87bb1be65e0ed1ffbf0ce07b4b162dcb54dedd1c5ee3cb667e6f8992d5e085
+124 -19
View File
@@ -4,9 +4,34 @@
# 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} && (%{undefined rhel} || %{defined epel})]
%bcond tests %{without bootstrap}
%bcond manpages %[%{undefined rhel} || %{defined epel}]
# 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
Release: 1%{?dist}
Version: 0.10.1
Release: 3%{?dist}
Summary: CLI for working with TOML files. Pronounced "tom clee."
License: MIT
@@ -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,53 +68,129 @@ 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_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}
%if %{with manpages}
# Install manpages
install -Dpm 0644 doc/*.1 -t %{buildroot}%{_mandir}/man1
%endif
# 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*
%if %{with manpages}
%{_mandir}/man1/tomcli*.1*
%endif
%changelog
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 0.10.1-3
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 0.10.1-2
- Rebuilt for Python 3.14.0rc2 bytecode
* Thu Jul 31 2025 Maxwell G <maxwell@gtmx.me> - 0.10.1-1
- Update to 0.10.1.
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Fri Jun 06 2025 Maxwell G <maxwell@gtmx.me> - 0.10.0-1
- Update to 0.10.0.
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 0.9.0-2
- Rebuilt for Python 3.14
* Sun Mar 02 2025 Maxwell G <maxwell@gtmx.me> - 0.9.0-1
- Update to 0.9.0.
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Sep 16 2024 Maxwell G <maxwell@gtmx.me> - 0.8.0-1
- Update to 0.8.0.
* Wed Aug 28 2024 Maxwell G <maxwell@gtmx.me> - 0.7.0-1
- Update to 0.7.0.
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.6.0-2
- Rebuilt for Python 3.13
* 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.