%global _empty_manifest_terminate_build 0
Name:		python-pure-pcapy3
Version:	1.0.1
Release:	1
Summary:	Pure Python reimplementation of pcapy. This package is API compatible and a drop-in replacement.
License:	Simplified BSD
URL:		http://bitbucket.org/viraptor/pure-pcapy/overview
Source0:	https://mirrors.aliyun.com/pypi/web/packages/82/09/37b4f0200cd8ad359c553ac87cd068fe7cebb24f00e59ee0f5218f14b389/pure-pcapy3-1.0.1.tar.gz
BuildArch:	noarch


%description
This package provides an API-compatible replacement for the popular pcapy package. Since it is a pure-Python package, it cannot access some elements like live traffic capture directly. Only file operations are allowed right now. Any operation which is available in pcapy and could not be implemented here will throw NotImplementedError. Behaviour should be compatible up to the text of some exceptions (tests are included).

%package -n python3-pure-pcapy3
Summary:	Pure Python reimplementation of pcapy. This package is API compatible and a drop-in replacement.
Provides:	python-pure-pcapy3
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-pure-pcapy3
This package provides an API-compatible replacement for the popular pcapy package. Since it is a pure-Python package, it cannot access some elements like live traffic capture directly. Only file operations are allowed right now. Any operation which is available in pcapy and could not be implemented here will throw NotImplementedError. Behaviour should be compatible up to the text of some exceptions (tests are included).

%package help
Summary:	Development documents and examples for pure-pcapy3
Provides:	python3-pure-pcapy3-doc
%description help
This package provides an API-compatible replacement for the popular pcapy package. Since it is a pure-Python package, it cannot access some elements like live traffic capture directly. Only file operations are allowed right now. Any operation which is available in pcapy and could not be implemented here will throw NotImplementedError. Behaviour should be compatible up to the text of some exceptions (tests are included).

%prep
%autosetup -n pure-pcapy3-1.0.1

%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-pure-pcapy3 -f filelist.lst
%dir %{python3_sitelib}/*

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

%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.1-1
- Package Spec generated