File python-pypcapkit.spec of Package python-pypcapkit

#
# spec file for package python-pypcapkit
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-pypcapkit
Version:        0.14.5
Release:        0
License:        Mozilla Public License 2.0 (MPL 2.0) (FIXME:No SPDX)
Summary:        Python multi-engine PCAP analyse kit
Url:            https://github.com/JarryShaw/pypcapkit
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/p/pypcapkit/pypcapkit-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
# SECTION test requirements
BuildRequires:  %{python_module aenum}
BuildRequires:  %{python_module chardet}
BuildRequires:  %{python_module dictdumper >= 0.7.0.post1}
BuildRequires:  %{python_module tbtrim >= 0.2.1}
# /SECTION
BuildRequires:  fdupes
Requires:       python-aenum
Requires:       python-chardet
Requires:       python-dictdumper >= 0.7.0.post1
Requires:       python-tbtrim >= 0.2.1
Suggests:       python-pathlib2 >= 2.3.2
Suggests:       python-dpkt
Suggests:       python-pyshark
Suggests:       python-scapy
Suggests:       python-emoji
Suggests:       python-dpkt
Suggests:       python-scapy
Suggests:       python-pyshark
Suggests:       python-requests
Suggests:       python-bs4
Suggests:       python-emoji
Suggests:       python-requests
Suggests:       python-bs4
BuildArch:      noarch

Requires(post):   update-alternatives
Requires(postun):   update-alternatives
%python_subpackages

%description
Python multi-engine PCAP analyse kit.

%prep
%setup -q -n pypcapkit-%{version}

%build
%python_build

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/pypcapkit
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%post
%python_install_alternative pypcapkit

%postun
%python_uninstall_alternative pypcapkit

%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/pcapkit-cli
%python_alternative %{_bindir}/pcapkit-vendor
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by