%global _empty_manifest_terminate_build 0
Name: python-pysmi
Version: 2.0.2
Release: 1
Summary: SNMP SMI/MIB Parser
License: BSD-2-Clause
URL: https://github.com/lextudio/pysmi
Source0: https://github.com/lextudio/pysmi/archive/refs/tags/v2.0.2.tar.gz#/pysmi-%{version}.tar.gz
BuildArch: noarch
Requires: python3-ply
%description
A pure-Python implementation of SNMP/SMI MIB parsing and conversion library.
%package -n python3-pysmi
Summary: SNMP SMI/MIB Parser
Provides: python-pysmi
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-poetry-core
BuildRequires: python3-flit-core
%description -n python3-pysmi
A pure-Python implementation of SNMP/SMI MIB parsing and conversion library.
%package help
Summary: Development documents and examples for pysmi
Provides: python3-pysmi-doc
%description help
A pure-Python implementation of SNMP/SMI MIB parsing and conversion library.
%prep
%autosetup -n pysmi-%{version}
%build
%pyproject_build
%install
%pyproject_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-pysmi -f filelist.lst
%dir %{python3_sitelib}/*
%{python3_sitelib}/pysmi/
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Jul 16 2026 sunliqiang <sunliqiang@kylinos.cn> - 2.0.2-1
- Update package to version 2.0.2
* Fri May 08 2026 openeuler_bot <infra@openeuler.sh> - 2.0.0-1
- update python-pysmi to 2.0.0
* Mon Jan 26 2026 openeuler_bot <infra@openeuler.sh> - 1.6.3-1
- Add new implicit imports handling. (version:1.6.3)
* Mon Aug 11 2025 zhang_wenyu <zhang_wenyu@hoperun.com> - 1.6.2-1
- update to 1.6.2
- Fixed debugging flag bug
* Tue Mar 11 2025 sqfu <dev01203@linx-info.com> - 1.5.11-1
- update to 1.5.11
- Added more hints to quick start guide
* Tue Nov 12 2024 liutao1 <liutao1@kylinos.cn> - 1.5.7-1
- Update package to version 1.5.7
Various improvements in MIB parsing, including better DEFVAL handling, symbol name generation, and more.
* Thu Oct 31 2024 jinshuaiyu <jinshuaiyu@kylinos.cn> - 1.5.6-1
- Update package to version 1.5.6
- Improved DISPLAY-HINT support.
* Fri Sep 06 2024 yaoxin <yao_xin001@hoperun.com> - 1.5.0-1
- Update to 1.5.0:
* Better formatting of texts in MIB documents.
* Reworked on reserved Python keywords handling.
* Fixed TEXTUAL-CONVENTION handling.
* Fixed DEFVAL handling.
* Added cyclic dependency detection.
* Other fixes and improvements for real-world MIBs.
* Removed package postfix. A helper release to enable migration.
* Implemented a better strict mode.
* Fixed old Python version support.
* Changed compiled Python file header comment style.
- Please see log: https://docs.lextudio.com/pysmi/changelog
* Mon May 9 2022 yaoxin <yaoxin30@h-partners.com> - 0.3.4-2
- License compliance rectification
* Wed Nov 25 2020 Python_Bot <Python_Bot@openeuler.org>
- Package Spec generated