1 # TODO: process docs to HTML?
4 %bcond_without doc # Markdown documentation
5 %bcond_without tests # unit tests
6 %bcond_without python2 # CPython 2.x module
7 %bcond_without python3 # CPython 3.x module
9 Summary: Fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
10 Summary(pl.UTF-8): Szybkie, proste tworzenie i analiza pakietów z definicjami podstawowych protokołów TCP/IP
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/dpkt/
17 Source0: https://files.pythonhosted.org/packages/source/d/dpkt/dpkt-%{version}.tar.gz
18 # Source0-md5: ac3ace1c5ee12a74f12a863ac9082b59
19 URL: https://pypi.org/project/dpkt/
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-pytest
25 BuildRequires: python-pytest-cov
29 BuildRequires: python3-modules >= 1:3.5
30 BuildRequires: python3-setuptools
32 BuildRequires: python3-pytest
33 BuildRequires: python3-pytest-cov
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.714
38 Requires: python-modules >= 1:2.7
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 The dpkt project is a Python module for fast, simple packet parsing,
44 with definitions for the basic TCP/IP protocols.
46 %description -l pl.UTF-8
47 Projekt dpkt to moduł Pythona do szybkiego, prostego analizowania
48 pakietów, wraz z definicjami podstawowych protokołów TCP/IP.
50 %package -n python3-dpkt
51 Summary: Fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
52 Summary(pl.UTF-8): Szybkie, proste tworzenie i analiza pakietów z definicjami podstawowych protokołów TCP/IP
53 Group: Libraries/Python
54 Requires: python3-modules >= 1:3.5
56 %description -n python3-dpkt
57 The dpkt project is a Python module for fast, simple packet parsing,
58 with definitions for the basic TCP/IP protocols.
60 %description -n python3-dpkt -l pl.UTF-8
61 Projekt dpkt to moduł Pythona do szybkiego, prostego analizowania
62 pakietów, wraz z definicjami podstawowych protokołów TCP/IP.
65 Summary: API documentation for Python dpkt module
66 Summary(pl.UTF-8): Dokumentacja API modułu Pythona dpkt
70 API documentation for Python dpkt module.
72 %description apidocs -l pl.UTF-8
73 Dokumentacja API modułu Pythona dpkt.
76 %setup -q -n dpkt-%{version}
83 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
84 PYTEST_PLUGINS="pytest_cov.plugin" \
85 %{__python} -m pytest dpkt
93 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
94 PYTEST_PLUGINS="pytest_cov.plugin" \
95 %{__python3} -m pytest dpkt
100 rm -rf $RPM_BUILD_ROOT
113 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
118 %doc AUTHORS LICENSE README.md
119 %{py_sitescriptdir}/dpkt
120 %{py_sitescriptdir}/dpkt-%{version}-py*.egg-info
124 %files -n python3-dpkt
125 %defattr(644,root,root,755)
126 %doc AUTHORS LICENSE README.md
127 %{py3_sitescriptdir}/dpkt
128 %{py3_sitescriptdir}/dpkt-%{version}-py*.egg-info
133 %defattr(644,root,root,755)