%global bename fortios %global pkgname anyconfig-%{bename}-backend %global desctxt \ This is a backend module for python-anyconfig to load fortios \ "show *configuration" outptus. \ \ python-anyconfig is a python library to provide common APIs to load and dump\ various configuration files like INI, JSON and YAML. %if 0%{?fedora} || 0%{?rhel} > 7 %bcond_without python2 %else %bcond_with python2 %endif Name: python-%{pkgname} Version: 0.1.7 Release: 1%{?dist}%{?dist} Summary: Backend module for python-anyconfig to load fortios show outputs Group: Development/Libraries License: MIT URL: https://github.com/ssato/python-anyconfig-fortios-backend Source0: %{pkgname}-%{version}.tar.gz BuildArch: noarch %if %{with python2} BuildRequires: python2-devel BuildRequires: python2-setuptools %endif BuildRequires: python3-devel BuildRequires: python3-setuptools %description %{desctxt} %if %{with python2} %package -n python2-%{pkgname} Summary: %{summary} Requires: python2-anyconfig %{?python_provide:%python_provide python2-%{pkgname}} %description -n python2-%{pkgname} %{desctxt} %endif %package -n python3-%{pkgname} Summary: %{summary} Requires: python3-anyconfig %{?python_provide:%python_provide python3-%{pkgname}} %description -n python3-%{pkgname} %{desctxt} %prep %autosetup -n %{pkgname}-%{version} %build %if %{with python2} %py2_build %endif %py3_build %install %if %{with python2} %py2_install %endif %py3_install %if %{with python2} %files -n python2-%{pkgname} %doc README.rst %{python2_sitelib}/* %endif %files -n python3-%{pkgname} %doc README.rst %{python3_sitelib}/* %changelog * Fri May 1 2020 Satoru SATOH - 0.1.7-1 - New upstream * Thu Apr 30 2020 Satoru SATOH - 0.1.6-1 - New upstream * Fri Apr 10 2020 Satoru SATOH - 0.1.3-1 - New upstream * Wed Mar 18 2020 Satoru SATOH - 0.1.2-1 - New upstream * Tue Mar 17 2020 Satoru SATOH - 0.1.1-1 - New upstream * Mon Mar 16 2020 Satoru SATOH - 0.1.0-1 - Initial packaging