File kseal.spec of Package kseal

#
# spec file for package kseal
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

%define skip_python310 1
%define skip_python311 1
%define skip_python312 1

Name:           kseal
Version:        2.0.2
Release:        0
Summary:        A kubeseal companion CLI to manage sealed secrets
License:        MIT
URL:            https://github.com/eznix86/kseal
Source:         https://files.pythonhosted.org/packages/source/k/%{name}/%{name}-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  python3-hatchling
BuildRequires:  python3-pip
BuildRequires:  python3-wheel
# Runtime dependencies as BuildRequires
BuildRequires:  python3-click >= 8.0.0
BuildRequires:  python3-kubernetes >= 28.0.0
BuildRequires:  python3-ruamel.yaml >= 0.18.0
BuildRequires:  python3-httpx >= 0.25.0
BuildRequires:  python3-rich >= 14.2.0
BuildRequires:  python3-packaging >= 23.0.0
BuildRequires:  python3-pydantic >= 2.0
BuildRequires:  fdupes
# SECTION test requirements
BuildRequires:  %{python_module pytest}
# /SECTION
Requires(post): update-alternatives
Requires(postun): update-alternatives
# as this package does not use the python subpackages macro,
# these dependencies are taken as is. On Tumbleweed, this translates
# to the default python
Requires:       python3-click >= 8.0.0
Requires:       python3-kubernetes >= 28.0.0
Requires:       python3-ruamel.yaml >= 0.18.0
Requires:       python3-httpx >= 0.25.0
Requires:       python3-rich >= 14.2.0
Requires:       python3-packaging >= 23.0.0
Requires:       python3-pydantic >= 2.0
BuildArch:      noarch

%description
A kubeseal companion CLI for viewing, exporting, encrypting, and offline
decrypting Kubernetes Secrets.

%prep
%autosetup -p1 -n kseal-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/%{name}
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
%pytest

%post
%python_install_alternative %{name}

%postun
%python_uninstall_alternative %{name}

%files
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/%{name}
%{python_sitelib}/%{name}
%{python_sitelib}/%{name}-%{version}*-info

%changelog

openSUSE Build Service is sponsored by