%global _empty_manifest_terminate_build 0
Name:           python-pyghmi
Version:        1.6.16
Release:        1
Summary:        Python General Hardware Management Initiative (IPMI and others)
License:        Apache-2.0
URL:            https://opendev.org/x/pyghmi
Source0:        https://files.pythonhosted.org/packages/source/p/pyghmi/pyghmi-%{version}.tar.gz
BuildArch:      noarch
%description
Pyghmi is a pure Python (mostly IPMI) server management library.

%package -n python3-pyghmi
Summary:        Python General Hardware Management Initiative (IPMI and others)
Provides:       python-pyghmi
# Base build requires
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pbr
BuildRequires:  python3-pip
BuildRequires:  python3-wheel
# General requires
BuildRequires:  python3-cryptography
BuildRequires:  python3-dateutil
BuildRequires:  python3-six
# General requires
Requires:       python3-cryptography
Requires:       python3-dateutil
Requires:       python3-six
%description -n python3-pyghmi
Pyghmi is a pure Python (mostly IPMI) server management library.

%package help
Summary:        Python General Hardware Management Initiative (IPMI and others)
Provides:       python3-pyghmi-doc
%description help
Pyghmi is a pure Python (mostly IPMI) server management library.

%prep
%autosetup -n pyghmi-%{version}

%build
%py3_build

%install
%py3_install

install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
    find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
    find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
    find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
    find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
    find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-pyghmi -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Sat May 09 2026 guochao <guochao@kylinos.cn> - 1.6.16-1
- Update to 1.6.16

* Thu Mar 05 2026 zhang_jian <zhang_jian7@hoperun.com> - 1.6.13-1
- Update to 1.6.13
- Adapt for alternate type presented in devicedescription
- Fix missing parameter in function signature

* Thu Nov 20 2025 lvwq <lvwenqiang@kylinos.cn> - 1.6.7-1
- Update to 1.6.7

* Fri Oct 17 2025 guochao <guochao@kylinos.cn> - 1.6.6-1
- Update version to 1.6.6

* Thu Aug 21 2025 lilu <lilu@kylinos.cn> - 1.6.5-1
- Update version to 1.6.5
- Attempt better redfish account deletion

* Thu Aug 7 2025 guochao <guochao@kylinos.cn> - 1.6.3-1
- Update package version to 1.6.3

* Tue Jul 1 2025 liudy  <liudingyao@kylinos.cn>  - 1.6.2-1
- Update version to 1.6.2

* Fri May 30 2025 hexun <hex@teligen.net> - 1.6.1-1
- Update version to 1.6.1

* Fri Oct 11 2024 liudy <liudingyao@kylinos.cn> - 1.5.72-1
- Update version to 1.5.72

* Fri Aug 30 2024 guochao <guochao@kylinos.cn> - 1.5.71-1
- Update package to version 1.5.71
- Add generic redfish license handling
- Fix the extended bmc configuration
- Restore UEFI configuration to IMM systems

* Thu Jul 25 2024 muxiaohui <muxiaohui@kylinos.cn> - 1.5.70-1
- Handle out of order setting instances

* Thu Jul 25 2024 liudy <liudingyao@kylinos.cn> - 1.5.69-1
- Handle out of order setting instances

* Tue Mar 19 2024 wangqiang <wangqiang1@kylinos.cn> - 1.5.67-1
- Update package to version 1.5.57

* Mon Jul 31 2023 sunhui <sunhui@kylinos.cn> - 1.5.61-1
- Update package to version 1.5.61

* Mon Feb 13 2023 wubijie <wubijie@kylinos.cn> - 1.5.57-1
- Update package to version 1.5.57

* Fri Jul 01 2022 renliang16 <renliang@uniontech.com> - 1.5.34-1
- Upgrade package python3-pyghmi to version 1.5.34

* Fri Aug 06 2021 OpenStack_SIG <openstack@openeuler.org> - 1.5.23-1
- Update version to 1.5.23
* Thu Jan 28 2021 zhangy <zhangy1317@foxmail.com>
- Add buildrequires
* Wed Nov 25 2020 Python_Bot <Python_Bot@openeuler.org>
- Package Spec generated