File python-NagAconda.spec of Package python-NagAconda

#
# spec file for package python-NagAconda
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define         oldpython python
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif
Name:           python-NagAconda
Version:        0.2.1
Release:        0
License:        BSD-3-Clause
Summary:        NagAconda is a Python Nagios wrapper
Url:            https://github.com/trifthen/NagAconda
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/N/NagAconda/NagAconda-%{version}.tar.gz
Patch0:         NagAconda-0.2.1-python3.patch
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
# SECTION test requirements
BuildRequires:  %{python_module nose >= 0.11}
# /SECTION
BuildRequires:  fdupes

%python_subpackages

%description
Nagios has been around for quite some time, but producing output it can 
consume is something of a black art. Only the plugin documentation 
actually explains what all the extra semicolons or extended formatting 
even means.

This is especially onerous when performance consuming add-ons expect a 
specific structure before operating properly. This package strives to 
greatly simplify the process of actually generating Nagios output using 
Python.

Please see the TODO file for a very rudimentary roadmap for this
project! Development should pick up after the move to github thanks
to the increase in volunteers.

%prep
%setup -q -n NagAconda-%{version}
%autopatch -p1

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
%python_exec %{_bindir}/nosetests --verbose  -w test

%files %{python_files}
%doc CHANGELOG README
%license LICENSE
%{python_sitelib}/*

%changelog