]> git.pld-linux.org Git - packages/python-netaddr.git/blame - python-netaddr.spec
- Python 3.2 fixes
[packages/python-netaddr.git] / python-netaddr.spec
CommitLineData
2249595d
JK
1#
2# Conditional build:
3%bcond_without python3 # do not build python3 modules
4
feabb8f2
AM
5%define module netaddr
6Summary: A pure Python network address representation and manipulation library
7Name: python-netaddr
2249595d 8Version: 0.7.5
df012ee4 9Release: 2
feabb8f2
AM
10License: BSD
11Group: Development/Languages/Python
2249595d
JK
12Source0: https://github.com/downloads/drkjam/netaddr/netaddr-%{version}.tar.gz
13# Source0-md5: 06168e1efb753d4d3e48778a5373e192
14URL: https://github.com/drkjam/netaddr/
f90abd59 15BuildRequires: python-modules
2249595d 16%{?with_python3:BuildRequires: python3-modules}
f90abd59 17BuildRequires: rpm-pythonprov
feabb8f2
AM
18BuildArch: noarch
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21%description
22A pure Python network address representation and manipulation library.
23
24netaddr provides a Pythonic way to work with:
25- IPv4 and IPv6 addresses and subnets (including CIDR notation)
26- MAC (Media Access Control) addresses in multiple presentation
27 formats
28- IEEE EUI-64, OUI and IAB identifiers
29- nmap-style IP address ranges
30- a user friendly IP glob-style format
31
32Included are routines for:
33- generating, sorting and summarizing IP addresses
34- converting IP addresses and ranges between various different formats
35- performing set based operations on groups of IP addresses and
36 subnets
37- arbitrary IP address range calculations and conversions
38- querying IEEE OUI and IAB organisational information
39- querying of IP standards related data from key IANA data sources
40
2249595d
JK
41%package -n python3-netaddr
42Summary: A pure Python network address representation and manipulation library
43Group: Development/Languages/Python
44
45%description -n python3-netaddr
46A pure Python network address representation and manipulation library.
47
48netaddr provides a Pythonic way to work with:
49- IPv4 and IPv6 addresses and subnets (including CIDR notation)
50- MAC (Media Access Control) addresses in multiple presentation
51 formats
52- IEEE EUI-64, OUI and IAB identifiers
53- nmap-style IP address ranges
54- a user friendly IP glob-style format
55
56Included are routines for:
57- generating, sorting and summarizing IP addresses
58- converting IP addresses and ranges between various different formats
59- performing set based operations on groups of IP addresses and
60 subnets
61- arbitrary IP address range calculations and conversions
62- querying IEEE OUI and IAB organisational information
63- querying of IP standards related data from key IANA data sources
64
65%package -n netaddr
66Summary: An interactive shell for the Python netaddr library
67Group: Development/Languages/Python
68Requires: %{name} = %{version}-%{release}
69
70%description -n netaddr
71Interactive shell for the python-netaddr library.
72
feabb8f2
AM
73%prep
74%setup -q -n %{module}-%{version}
75
76%build
77%{__python} ./setup.py build
78
2249595d
JK
79%if %{with python3}
80%{__python3} ./setup.py build
81%endif
82
feabb8f2
AM
83%install
84rm -rf $RPM_BUILD_ROOT
85
86%{__python} ./setup.py install \
87 --optimize 2 \
88 --root=$RPM_BUILD_ROOT
89
90%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
91%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
92%py_postclean
93
2249595d
JK
94%if %{with python3}
95%{__python3} ./setup.py install \
96 --optimize 2 \
97 --root=$RPM_BUILD_ROOT
98%py3_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
99%py3_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
2249595d
JK
100%endif
101
feabb8f2
AM
102%clean
103rm -rf $RPM_BUILD_ROOT
104
105%files
106%defattr(644,root,root,755)
107%doc docs/api AUTHORS CHANGELOG README THANKS
feabb8f2
AM
108%{py_sitescriptdir}/*.egg-info
109%dir %{py_sitescriptdir}/%{module}
110%{py_sitescriptdir}/%{module}/*.py[co]
111%dir %{py_sitescriptdir}/%{module}/eui
112%{py_sitescriptdir}/%{module}/eui/*.py[co]
113%{py_sitescriptdir}/%{module}/eui/*.idx
114%{py_sitescriptdir}/%{module}/eui/*.txt
115%dir %{py_sitescriptdir}/%{module}/ip
116%{py_sitescriptdir}/%{module}/ip/*.py[co]
117%{py_sitescriptdir}/%{module}/ip/*-space
118%{py_sitescriptdir}/%{module}/ip/*-addresses
119%dir %{py_sitescriptdir}/%{module}/strategy
120%{py_sitescriptdir}/%{module}/strategy/*.py[co]
121%dir %{py_sitescriptdir}/%{module}/tests
122%{py_sitescriptdir}/%{module}/tests/*.py[co]
2249595d
JK
123#%{py_sitescriptdir}/%{module}/tests/2.x/core
124#%{py_sitescriptdir}/%{module}/tests/2.x/eui
125#%{py_sitescriptdir}/%{module}/tests/2.x/ip
126#%{py_sitescriptdir}/%{module}/tests/2.x/strategy
127
128%if %{with python3}
129%files -n python3-netaddr
130%defattr(644,root,root,755)
131%doc docs/api AUTHORS CHANGELOG README THANKS
132%{py3_sitescriptdir}/*.egg-info
133%dir %{py3_sitescriptdir}/%{module}
df012ee4
JK
134%{py3_sitescriptdir}/%{module}/*.py
135%{py3_sitescriptdir}/%{module}/__pycache__
2249595d 136%dir %{py3_sitescriptdir}/%{module}/eui
df012ee4
JK
137%{py3_sitescriptdir}/%{module}/eui/*.py
138%{py3_sitescriptdir}/%{module}/eui/__pycache__
2249595d
JK
139%{py3_sitescriptdir}/%{module}/eui/*.idx
140%{py3_sitescriptdir}/%{module}/eui/*.txt
141%dir %{py3_sitescriptdir}/%{module}/ip
df012ee4
JK
142%{py3_sitescriptdir}/%{module}/ip/*.py
143%{py3_sitescriptdir}/%{module}/ip/__pycache__
2249595d
JK
144%{py3_sitescriptdir}/%{module}/ip/*-space
145%{py3_sitescriptdir}/%{module}/ip/*-addresses
146%dir %{py3_sitescriptdir}/%{module}/strategy
df012ee4
JK
147%{py3_sitescriptdir}/%{module}/strategy/*.py
148%{py3_sitescriptdir}/%{module}/strategy/__pycache__
2249595d 149%dir %{py3_sitescriptdir}/%{module}/tests
df012ee4
JK
150%{py3_sitescriptdir}/%{module}/tests/*.py
151%{py3_sitescriptdir}/%{module}/tests/__pycache__
2249595d
JK
152#%{py3_sitescriptdir}/%{module}/tests/3.x/core
153#%{py3_sitescriptdir}/%{module}/tests/3.x/eui
154#%{py3_sitescriptdir}/%{module}/tests/3.x/ip
155#%{py3_sitescriptdir}/%{module}/tests/3.x/strategy
156%endif
157
158%files -n netaddr
159%defattr(644,root,root,755)
160%attr(755,root,root) %{_bindir}/netaddr
This page took 0.107565 seconds and 4 git commands to generate.