]> git.pld-linux.org Git - packages/python-netaddr.git/blob - python-netaddr.spec
Version: 0.7.14, sphinx-generated docs
[packages/python-netaddr.git] / python-netaddr.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs # sphinx based documentation
4 %bcond_without  python3         # do not build python3 modules
5
6 %define         module  netaddr
7 Summary:        A pure Python network address representation and manipulation library
8 Name:           python-netaddr
9 Version:        0.7.14
10 Release:        1
11 License:        BSD
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}
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 A pure Python network address representation and manipulation library.
25
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
29   formats
30 - IEEE EUI-64, OUI and IAB identifiers
31 - nmap-style IP address ranges
32 - a user friendly IP glob-style format
33
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
38   subnets
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
42
43 %package -n python3-netaddr
44 Summary:        A pure Python network address representation and manipulation library
45 Group:          Development/Languages/Python
46
47 %description -n python3-netaddr
48 A pure Python network address representation and manipulation library.
49
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
53   formats
54 - IEEE EUI-64, OUI and IAB identifiers
55 - nmap-style IP address ranges
56 - a user friendly IP glob-style format
57
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
62   subnets
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
66
67 %package -n netaddr
68 Summary:        An interactive shell for the Python netaddr library
69 Group:          Development/Languages/Python
70 Requires:       %{name} = %{version}-%{release}
71
72 %description -n netaddr
73 Interactive shell for the python-netaddr library.
74
75 %prep
76 %setup -q -n %{module}-%{version}
77
78 %build
79 %{__python} setup.py build
80
81 %if %{with python3}
82 %{__python3} setup.py build
83 %endif
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 %{__python} setup.py install \
88         --optimize 2 \
89         --root=$RPM_BUILD_ROOT
90
91 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
92 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
93 %py_postclean
94
95 %if %{with apidocs}
96 sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs/source build/html
97 %endif
98
99 %if %{with python3}
100 %{__python3} setup.py install \
101         --optimize 2 \
102         --root=$RPM_BUILD_ROOT
103 %py3_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
104 %py3_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
105 %endif
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %files
111 %defattr(644,root,root,755)
112 %doc AUTHORS CHANGELOG README THANKS
113 %if %{with apidocs}
114 %doc build/html
115 %endif
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
134
135 %if %{with python3}
136 %files -n python3-netaddr
137 %defattr(644,root,root,755)
138 %doc AUTHORS CHANGELOG README THANKS
139 %if %{with apidocs}
140 %doc build/html
141 %endif
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
165 %endif
166
167 %files -n netaddr
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_bindir}/netaddr
This page took 0.067201 seconds and 3 git commands to generate.