File nbcli.spec of Package nbcli
#
# spec file for package nbcli
#
# Copyright (c) 2024-2025, Martin Hauke <mardnh@gmx.de>
#
# 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 pythons python3
Name: nbcli
Version: 0.10.0.dev2
Release: 0
Summary: Extensible CLI for Netbox
License: GPL-3.0-or-later
URL: https://nbcli.codeberg.page/
#Git-Clone: https://codeberg.org/nbcli/nbcli.git
Source: https://codeberg.org/nbcli/nbcli/archive/v%{version}.tar.gz
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-wheel
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python3-PyYAML
Requires: python3-setuptools
Requires: python3-pynetbox >= 7.3.4
BuildArch: noarch
%description
Extensible command-line interface for Netbox using the pynetbox module.
Notable Features:
* Search Netbox instance
* Filter Netbox objects
* Create and update Netbox objects with YAML file
* Shell with preloaded pynetbox endpoints
* Custom Views
* Custom Commands
%prep
%autosetup -n nbcli
%build
%pyproject_wheel
%check
# disabled, tests need a netbox docker container setup
#%%pytest
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files
%license LICENSE
%doc README.md
%{_bindir}/nbcli
%{python_sitelib}/nbcli
%{python_sitelib}/nbcli-%{version}.dist-info
%changelog