]> git.pld-linux.org Git - packages/python-dpkt.git/blame - python-dpkt.spec
rebuild with python 3.10
[packages/python-dpkt.git] / python-dpkt.spec
CommitLineData
a0bfcd09
JB
1# TODO: process docs to HTML?
2#
3# Conditional build:
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
8
9Summary: Fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
10Summary(pl.UTF-8): Szybkie, proste tworzenie i analiza pakietów z definicjami podstawowych protokołów TCP/IP
11Name: python-dpkt
12Version: 1.9.7.2
1f14d3f8 13Release: 3
a0bfcd09
JB
14License: BSD
15Group: Libraries/Python
16#Source0Download: https://pypi.org/simple/dpkt/
17Source0: https://files.pythonhosted.org/packages/source/d/dpkt/dpkt-%{version}.tar.gz
18# Source0-md5: ac3ace1c5ee12a74f12a863ac9082b59
19URL: https://pypi.org/project/dpkt/
20%if %{with python2}
21BuildRequires: python-modules >= 1:2.7
22BuildRequires: python-setuptools
23%if %{with tests}
24BuildRequires: python-pytest
25BuildRequires: python-pytest-cov
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-modules >= 1:3.5
30BuildRequires: python3-setuptools
31%if %{with tests}
32BuildRequires: python3-pytest
33BuildRequires: python3-pytest-cov
34%endif
35%endif
36BuildRequires: rpm-pythonprov
37BuildRequires: rpmbuild(macros) >= 1.714
38Requires: python-modules >= 1:2.7
39BuildArch: noarch
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43The dpkt project is a Python module for fast, simple packet parsing,
44with definitions for the basic TCP/IP protocols.
45
46%description -l pl.UTF-8
47Projekt dpkt to moduł Pythona do szybkiego, prostego analizowania
48pakietów, wraz z definicjami podstawowych protokołów TCP/IP.
49
50%package -n python3-dpkt
51Summary: Fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
52Summary(pl.UTF-8): Szybkie, proste tworzenie i analiza pakietów z definicjami podstawowych protokołów TCP/IP
53Group: Libraries/Python
54Requires: python3-modules >= 1:3.5
55
56%description -n python3-dpkt
57The dpkt project is a Python module for fast, simple packet parsing,
58with definitions for the basic TCP/IP protocols.
59
60%description -n python3-dpkt -l pl.UTF-8
61Projekt dpkt to moduł Pythona do szybkiego, prostego analizowania
62pakietów, wraz z definicjami podstawowych protokołów TCP/IP.
63
64%package apidocs
65Summary: API documentation for Python dpkt module
66Summary(pl.UTF-8): Dokumentacja API modułu Pythona dpkt
67Group: Documentation
68
69%description apidocs
70API documentation for Python dpkt module.
71
72%description apidocs -l pl.UTF-8
73Dokumentacja API modułu Pythona dpkt.
74
75%prep
76%setup -q -n dpkt-%{version}
77
78%build
79%if %{with python2}
80%py_build
81
82%if %{with tests}
83PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
84PYTEST_PLUGINS="pytest_cov.plugin" \
85%{__python} -m pytest dpkt
86%endif
87%endif
88
89%if %{with python3}
90%py3_build
91
92%if %{with tests}
93PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
94PYTEST_PLUGINS="pytest_cov.plugin" \
95%{__python3} -m pytest dpkt
96%endif
97%endif
98
99%install
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
103%py_install
104
105%py_postclean
106%endif
107
108%if %{with python3}
109%py3_install
110%endif
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%files
117%defattr(644,root,root,755)
118%doc AUTHORS LICENSE README.md
119%{py_sitescriptdir}/dpkt
120%{py_sitescriptdir}/dpkt-%{version}-py*.egg-info
121%endif
122
123%if %{with python3}
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
129%endif
130
131%if %{with doc}
132%files apidocs
133%defattr(644,root,root,755)
134%doc docs/*
135%endif
This page took 0.110277 seconds and 4 git commands to generate.