Blob Blame History Raw
%global srcname hpilo

Name:           python-%{srcname}
Version:        4.3
Release:        1%{?dist}
Summary:        iLO automation from python or shell

License:        ASL 2.0 or GPLv3+
URL:            https://github.com/seveas/python-hpilo
Source:         %{pypi_source %{name}}

BuildArch:      noarch

%global _description \
%{summary}.

%description %{_description}

%package     -n python2-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{srcname}}
BuildRequires:  python2-devel

%description -n python2-%{srcname} %{_description}

Python 2 version.

%package     -n python%{python3_pkgversion}-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
BuildRequires:  python%{python3_pkgversion}-devel

%description -n python%{python3_pkgversion}-%{srcname} %{_description}

Python %{python3_pkgversion} version.

%prep
%autosetup

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%files -n python2-%{srcname}
%license COPYING
%doc README.md CHANGES examples ilo.conf.example
%{python2_sitelib}/hpilo.py*
%{python2_sitelib}/hpilo_fw.py*
%{python2_sitelib}/python_hpilo-*.egg-info

%files -n python%{python3_pkgversion}-%{srcname}
%license COPYING
%doc README.md CHANGES examples ilo.conf.example
%{_bindir}/hpilo_cli
%{python3_sitelib}/hpilo.py
%{python3_sitelib}/hpilo_fw.py
%{python3_sitelib}/__pycache__/hpilo*
%{python3_sitelib}/python_hpilo-*.egg-info

%changelog
* Sun Jul 14 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.3-1
- Initial package