File linode-cli.spec of Package failed_linode-cli

Name:           linode-cli
Version:        5.25.0
Release:        1.1
Summary:        Linode Command Line Interface

License:        MIT
URL:            https://github.com/linode/linode-cli
Source0:        linode-cli-%{version}.tar.gz
Source1:        openapi.yaml
# Added setuptools as build requirement so pkg_resources is available during %build
BuildRequires:  python311-setuptools

# Minimal additional build requires that are commonly needed; keep to a minimum.
BuildRequires:  python311-devel
BuildRequires:  python311-pip

%description
The Linode CLI is a command line interface for interacting with the Linode API.

%prep
%setup -q

%build
# The upstream build step invokes the package module to generate client files.
# Ensure pkg_resources (setuptools) is available during this step.
python3.11 -m linodecli bake %{_sourcedir}/openapi.yaml --skip-config

%install
rm -rf %{buildroot}
# Install the package into the buildroot. Use pip to ensure entry points are created.
python3.11 -m pip install --root %{buildroot} --no-deps --ignore-installed .

%files
%doc README.md
%license LICENSE
%{_bindir}/linode-cli
%{python3_sitelib}/linodecli*
/usr/share/man/man1/linode-cli.1*

%changelog
* Sun Aug 10 2025 Packager <packager@example.com> - 5.25.0-1.1
- Add python311-setuptools to BuildRequires so pkg_resources is available during %build
openSUSE Build Service is sponsored by