File python-nagiosplugin.spec of Package python-nagiosplugin

# Created by pyp2rpm-3.3.5
%global pypi_name nagiosplugin

%if ! %{defined python3_pkgversion}
%define python3_pkgversion 3
%endif

Name:           python-%{pypi_name}
Version:        1.3.2
Release:        3%{?dist}
Summary:        Class library for writing Nagios (Icinga) plugins

License:        ZPL-2.1
URL:            https://nagiosplugin.readthedocs.io/
Source0:        https://files.pythonhosted.org/packages/source/n/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools

BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools

%description
The nagiosplugin library About **nagiosplugin** is a Python class library which
helps writing Nagios (or Icinga) compatible plugins easily in Python. It cares
for much of the boilerplate code and default logic commonly found in Nagios
checks, including:- Nagios 3 Plugin API compliant parameters and output
formatting - Full Nagios range syntax support - Automatic threshold checking -
Multiple...

%package -n     python2-%{pypi_name}
Summary:        Class library for writing Nagios (Icinga) plugins

%description -n python2-%{pypi_name}
The nagiosplugin library About **nagiosplugin** is a Python class library which
helps writing Nagios (or Icinga) compatible plugins easily in Python. It cares
for much of the boilerplate code and default logic commonly found in Nagios
checks, including:- Nagios 3 Plugin API compliant parameters and output
formatting - Full Nagios range syntax support - Automatic threshold checking -
Multiple...

%package -n     python%{python3_pkgversion}-%{pypi_name}
Summary:        Class library for writing Nagios (Icinga) plugins

%description -n python%{python3_pkgversion}-%{pypi_name}
The nagiosplugin library About **nagiosplugin** is a Python class library which
helps writing Nagios (or Icinga) compatible plugins easily in Python. It cares
for much of the boilerplate code and default logic commonly found in Nagios
checks, including:- Nagios 3 Plugin API compliant parameters and output
formatting - Full Nagios range syntax support - Automatic threshold checking -
Multiple...

%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# Move Examples
mv nagiosplugin/examples doc

%build
%{__python2} setup.py build
%{__python3} setup.py build

%install
# Must do the default python version install last because
# the scripts in /usr/bin are overwritten with every setup.py install.
%{__python2} setup.py install --skip-build --root %{buildroot}
%{__python3} setup.py install --skip-build --root %{buildroot}

%files -n python2-%{pypi_name}
%license LICENSE.txt
%doc README.txt HISTORY.txt CONTRIBUTORS.txt doc/examples
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info

%files -n python%{python3_pkgversion}-%{pypi_name}
%license LICENSE.txt
%doc README.txt HISTORY.txt CONTRIBUTORS.txt doc/examples
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info

%changelog
* Tue Feb 16 2021 Admin User - 1.3.2-3
- correct examples docs

* Tue Feb 16 2021 Admin User - 1.3.2-2
- remove seperate doc package

* Tue Feb 16 2021 Admin User - 1.3.2-1
- Initial package.
openSUSE Build Service is sponsored by