# Created by pyp2rpm-3.3.2 %global pypi_name nagiosplugin Name: python-%{pypi_name} Version: 1.2.4 Release: 1%{?dist} Summary: Class library for writing Nagios (Icinga) plugins License: ZPL-2.1 URL: https://bitbucket.org/flyingcircus/nagiosplugin 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 Requires: python2-setuptools %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 Requires: python%{python3_pkgversion}-setuptools %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 %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} %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-%{pypi_name} %doc README.txt %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python%{python3_pkgversion}-%{pypi_name} %doc README.txt %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Thu Mar 21 2019 mockbuilder - 1.2.4-1 - Initial package.