]> git.pld-linux.org Git - packages/python-netaddr.git/blob - python-netaddr.spec
- Version: 0.7.5
[packages/python-netaddr.git] / python-netaddr.spec
1 #
2 # Conditional build:
3 %bcond_without  python3         # do not build python3 modules
4
5 %define         module  netaddr
6 Summary:        A pure Python network address representation and manipulation library
7 Name:           python-netaddr
8 Version:        0.7.5
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages/Python
12 Source0:        https://github.com/downloads/drkjam/netaddr/netaddr-%{version}.tar.gz
13 # Source0-md5:  06168e1efb753d4d3e48778a5373e192
14 URL:            https://github.com/drkjam/netaddr/
15 BuildRequires:  python-modules
16 %{?with_python3:BuildRequires:  python3-modules}
17 BuildRequires:  rpm-pythonprov
18 BuildArch:      noarch
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 A pure Python network address representation and manipulation library.
23
24 netaddr 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
32 Included 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
41 %package -n python3-netaddr
42 Summary:        A pure Python network address representation and manipulation library
43 Group:          Development/Languages/Python
44
45 %description -n python3-netaddr
46 A pure Python network address representation and manipulation library.
47
48 netaddr 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
56 Included 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
66 Summary:        An interactive shell for the Python netaddr library
67 Group:          Development/Languages/Python
68 Requires:       %{name} = %{version}-%{release}
69
70 %description -n netaddr
71 Interactive shell for the python-netaddr library.
72
73 %prep
74 %setup -q -n %{module}-%{version}
75
76 %build
77 %{__python} ./setup.py build
78
79 %if %{with python3}
80 %{__python3} ./setup.py build
81 %endif
82
83 %install
84 rm -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
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}
100 %py3_postclean
101 %endif
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %files
107 %defattr(644,root,root,755)
108 %doc docs/api AUTHORS CHANGELOG README THANKS
109 %{py_sitescriptdir}/*.egg-info
110 %dir %{py_sitescriptdir}/%{module}
111 %{py_sitescriptdir}/%{module}/*.py[co]
112 %dir %{py_sitescriptdir}/%{module}/eui
113 %{py_sitescriptdir}/%{module}/eui/*.py[co]
114 %{py_sitescriptdir}/%{module}/eui/*.idx
115 %{py_sitescriptdir}/%{module}/eui/*.txt
116 %dir %{py_sitescriptdir}/%{module}/ip
117 %{py_sitescriptdir}/%{module}/ip/*.py[co]
118 %{py_sitescriptdir}/%{module}/ip/*-space
119 %{py_sitescriptdir}/%{module}/ip/*-addresses
120 %dir %{py_sitescriptdir}/%{module}/strategy
121 %{py_sitescriptdir}/%{module}/strategy/*.py[co]
122 %dir %{py_sitescriptdir}/%{module}/tests
123 %{py_sitescriptdir}/%{module}/tests/*.py[co]
124 #%{py_sitescriptdir}/%{module}/tests/2.x/core
125 #%{py_sitescriptdir}/%{module}/tests/2.x/eui
126 #%{py_sitescriptdir}/%{module}/tests/2.x/ip
127 #%{py_sitescriptdir}/%{module}/tests/2.x/strategy
128
129 %if %{with python3}
130 %files -n python3-netaddr
131 %defattr(644,root,root,755)
132 %doc docs/api AUTHORS CHANGELOG README THANKS
133 %{py3_sitescriptdir}/*.egg-info
134 %dir %{py3_sitescriptdir}/%{module}
135 %{py3_sitescriptdir}/%{module}/*.py[co]
136 %dir %{py3_sitescriptdir}/%{module}/eui
137 %{py3_sitescriptdir}/%{module}/eui/*.py[co]
138 %{py3_sitescriptdir}/%{module}/eui/*.idx
139 %{py3_sitescriptdir}/%{module}/eui/*.txt
140 %dir %{py3_sitescriptdir}/%{module}/ip
141 %{py3_sitescriptdir}/%{module}/ip/*.py[co]
142 %{py3_sitescriptdir}/%{module}/ip/*-space
143 %{py3_sitescriptdir}/%{module}/ip/*-addresses
144 %dir %{py3_sitescriptdir}/%{module}/strategy
145 %{py3_sitescriptdir}/%{module}/strategy/*.py[co]
146 %dir %{py3_sitescriptdir}/%{module}/tests
147 %{py3_sitescriptdir}/%{module}/tests/*.py[co]
148 #%{py3_sitescriptdir}/%{module}/tests/3.x/core
149 #%{py3_sitescriptdir}/%{module}/tests/3.x/eui
150 #%{py3_sitescriptdir}/%{module}/tests/3.x/ip
151 #%{py3_sitescriptdir}/%{module}/tests/3.x/strategy
152 %endif
153
154 %files -n netaddr
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_bindir}/netaddr
This page took 0.101229 seconds and 4 git commands to generate.