]>
Commit | Line | Data |
---|---|---|
c7df42d1 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
bfe60cd7 | 4 | |
cb73e9c1 | 5 | %define module ipaddr |
26e84e1b MK |
6 | |
7 | Summary: Python module is useful to manipulate IP addresses (sets) | |
f236667b | 8 | Summary(pl.UTF-8): Moduł języka Python do operowania adresami lub zbiorami adresów IP |
26e84e1b | 9 | Name: python-%{module} |
24bf32aa | 10 | Version: 2.2.0 |
9e18375f | 11 | Release: 2 |
90431614 | 12 | License: Apache v2.0 |
26e84e1b | 13 | Group: Libraries/Python |
c7df42d1 JB |
14 | #Source0Download: https://pypi.org/simple/ipaddr/ |
15 | Source0: https://files.pythonhosted.org/packages/source/i/ipaddr/%{module}-%{version}.tar.gz | |
24bf32aa | 16 | # Source0-md5: f88353e40dec06410acfa075b8209b27 |
c7df42d1 JB |
17 | URL: https://github.com/google/ipaddr-py |
18 | BuildRequires: rpmbuild(macros) >= 1.714 | |
f236667b JB |
19 | BuildRequires: python >= 2 |
20 | BuildRequires: python-modules >= 2 | |
2104360b | 21 | BuildRequires: rpm-pythonprov |
a3bcb4f7 | 22 | Requires: python-modules |
f56acc3f | 23 | BuildArch: noarch |
26e84e1b MK |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | This module is useful if you need to manipulate IP addresses or sets | |
28 | of IP addresses. | |
29 | ||
79df6450 | 30 | %description -l pl.UTF-8 |
f236667b | 31 | Moduł języka Python do operowania adresami lub zbiorami adresów IP. |
26e84e1b MK |
32 | |
33 | %prep | |
34 | %setup -q -n %{module}-%{version} | |
35 | ||
a3bcb4f7 | 36 | %build |
e4f42942 | 37 | %py_build |
a3bcb4f7 | 38 | |
c7df42d1 JB |
39 | %if %{with tests} |
40 | %{__python} ipaddr_test.py | |
41 | %endif | |
42 | ||
26e84e1b MK |
43 | %install |
44 | rm -rf $RPM_BUILD_ROOT | |
c7df42d1 | 45 | |
e4f42942 | 46 | %py_install |
bfe60cd7 | 47 | |
f56acc3f | 48 | %py_postclean |
26e84e1b MK |
49 | |
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
f236667b | 55 | %{py_sitescriptdir}/ipaddr.py[co] |
a3bcb4f7 AM |
56 | %if "%{py_ver}" > "2.4" |
57 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
58 | %endif |