3 %bcond_without apidocs # sphinx based documentation
4 %bcond_without python3 # do not build python3 modules
7 Summary: A pure Python network address representation and manipulation library
12 Group: Development/Languages/Python
13 Source0: https://pypi.python.org/packages/source/n/netaddr/%{module}-%{version}.tar.gz
14 # Source0-md5: 1ba9d1e887c838f190774cf6b74c109d
15 URL: https://github.com/drkjam/netaddr/
16 BuildRequires: python-modules
17 %{?with_python3:BuildRequires: python3-modules}
18 BuildRequires: rpm-pythonprov
19 %{?with_apidocs:BuildRequires: sphinx-pdg}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 A pure Python network address representation and manipulation library.
26 netaddr provides a Pythonic way to work with:
27 - IPv4 and IPv6 addresses and subnets (including CIDR notation)
28 - MAC (Media Access Control) addresses in multiple presentation
30 - IEEE EUI-64, OUI and IAB identifiers
31 - nmap-style IP address ranges
32 - a user friendly IP glob-style format
34 Included are routines for:
35 - generating, sorting and summarizing IP addresses
36 - converting IP addresses and ranges between various different formats
37 - performing set based operations on groups of IP addresses and
39 - arbitrary IP address range calculations and conversions
40 - querying IEEE OUI and IAB organisational information
41 - querying of IP standards related data from key IANA data sources
43 %package -n python3-netaddr
44 Summary: A pure Python network address representation and manipulation library
45 Group: Development/Languages/Python
47 %description -n python3-netaddr
48 A pure Python network address representation and manipulation library.
50 netaddr provides a Pythonic way to work with:
51 - IPv4 and IPv6 addresses and subnets (including CIDR notation)
52 - MAC (Media Access Control) addresses in multiple presentation
54 - IEEE EUI-64, OUI and IAB identifiers
55 - nmap-style IP address ranges
56 - a user friendly IP glob-style format
58 Included are routines for:
59 - generating, sorting and summarizing IP addresses
60 - converting IP addresses and ranges between various different formats
61 - performing set based operations on groups of IP addresses and
63 - arbitrary IP address range calculations and conversions
64 - querying IEEE OUI and IAB organisational information
65 - querying of IP standards related data from key IANA data sources
68 Summary: An interactive shell for the Python netaddr library
69 Group: Development/Languages/Python
70 Requires: %{name} = %{version}-%{release}
72 %description -n netaddr
73 Interactive shell for the python-netaddr library.
76 %setup -q -n %{module}-%{version}
79 %{__python} setup.py build
82 %{__python3} setup.py build
86 rm -rf $RPM_BUILD_ROOT
87 %{__python} setup.py install \
89 --root=$RPM_BUILD_ROOT
91 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
92 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
96 sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs/source build/html
100 %{__python3} setup.py install \
102 --root=$RPM_BUILD_ROOT
103 %py3_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
104 %py3_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
108 rm -rf $RPM_BUILD_ROOT
111 %defattr(644,root,root,755)
112 %doc AUTHORS CHANGELOG README THANKS
116 %{py_sitescriptdir}/*.egg-info
117 %dir %{py_sitescriptdir}/%{module}
118 %{py_sitescriptdir}/%{module}/*.py[co]
119 %dir %{py_sitescriptdir}/%{module}/eui
120 %{py_sitescriptdir}/%{module}/eui/*.py[co]
121 %{py_sitescriptdir}/%{module}/eui/*.idx
122 %{py_sitescriptdir}/%{module}/eui/*.txt
123 %dir %{py_sitescriptdir}/%{module}/ip
124 %{py_sitescriptdir}/%{module}/ip/*.py[co]
125 %{py_sitescriptdir}/%{module}/ip/*.xml
126 %dir %{py_sitescriptdir}/%{module}/strategy
127 %{py_sitescriptdir}/%{module}/strategy/*.py[co]
128 %dir %{py_sitescriptdir}/%{module}/tests
129 %{py_sitescriptdir}/%{module}/tests/*.py[co]
130 #%{py_sitescriptdir}/%{module}/tests/2.x/core
131 #%{py_sitescriptdir}/%{module}/tests/2.x/eui
132 #%{py_sitescriptdir}/%{module}/tests/2.x/ip
133 #%{py_sitescriptdir}/%{module}/tests/2.x/strategy
136 %files -n python3-netaddr
137 %defattr(644,root,root,755)
138 %doc AUTHORS CHANGELOG README THANKS
142 %{py3_sitescriptdir}/*.egg-info
143 %dir %{py3_sitescriptdir}/%{module}
144 %{py3_sitescriptdir}/%{module}/*.py
145 %{py3_sitescriptdir}/%{module}/__pycache__
146 %dir %{py3_sitescriptdir}/%{module}/eui
147 %{py3_sitescriptdir}/%{module}/eui/*.py
148 %{py3_sitescriptdir}/%{module}/eui/__pycache__
149 %{py3_sitescriptdir}/%{module}/eui/*.idx
150 %{py3_sitescriptdir}/%{module}/eui/*.txt
151 %dir %{py3_sitescriptdir}/%{module}/ip
152 %{py3_sitescriptdir}/%{module}/ip/*.py
153 %{py3_sitescriptdir}/%{module}/ip/__pycache__
154 %{py3_sitescriptdir}/%{module}/ip/*.xml
155 %dir %{py3_sitescriptdir}/%{module}/strategy
156 %{py3_sitescriptdir}/%{module}/strategy/*.py
157 %{py3_sitescriptdir}/%{module}/strategy/__pycache__
158 %dir %{py3_sitescriptdir}/%{module}/tests
159 %{py3_sitescriptdir}/%{module}/tests/*.py
160 %{py3_sitescriptdir}/%{module}/tests/__pycache__
161 #%{py3_sitescriptdir}/%{module}/tests/3.x/core
162 #%{py3_sitescriptdir}/%{module}/tests/3.x/eui
163 #%{py3_sitescriptdir}/%{module}/tests/3.x/ip
164 #%{py3_sitescriptdir}/%{module}/tests/3.x/strategy
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_bindir}/netaddr