]>
Commit | Line | Data |
---|---|---|
b3652667 AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | ||
5 | %define module ipaddress | |
6 | Summary: IPv4/IPv6 manipulation library | |
7 | Name: python-%{module} | |
8 | Version: 1.0.6 | |
9 | Release: 1 | |
10 | License: PSF | |
11 | Group: Libraries/Python | |
12 | Source0: https://pypi.python.org/packages/source/i/ipaddress/%{module}-%{version}.tar.gz | |
13 | # Source0-md5: a869a0c03f03961c714046a579e38e68 | |
14 | URL: https://pypi.python.org/pypi/ipaddress/ | |
15 | BuildRequires: python-devel | |
16 | BuildRequires: python-distribute | |
17 | BuildRequires: rpm-pythonprov | |
18 | BuildRequires: rpmbuild(macros) >= 1.219 | |
19 | Requires: python-modules | |
20 | BuildArch: noarch | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | IPv4/IPv6 manipulation library. | |
25 | ||
26 | %package apidocs | |
27 | Summary: %{module} API documentation | |
28 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
29 | Group: Documentation | |
30 | ||
31 | %description apidocs | |
32 | API documentation for %{module}. | |
33 | ||
34 | %description apidocs -l pl.UTF-8 | |
35 | Dokumentacja API %{module}. | |
36 | ||
37 | %prep | |
38 | %setup -q -n %{module}-%{version} | |
39 | ||
40 | %build | |
41 | %{__python} setup.py build --build-base build-2 %{?with_tests:test} | |
42 | ||
43 | %if %{with doc} | |
44 | cd docs | |
45 | %{__make} -j1 html | |
46 | rm -rf _build/html/_sources | |
47 | %endif | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %{__python} setup.py \ | |
53 | build --build-base build-2 \ | |
54 | install --skip-build \ | |
55 | --optimize=2 \ | |
56 | --root=$RPM_BUILD_ROOT | |
57 | ||
58 | %py_postclean | |
59 | ||
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %files | |
64 | %defattr(644,root,root,755) | |
65 | %doc README.txt | |
66 | %{py_sitescriptdir}/*.py[co] | |
67 | %if "%{py_ver}" > "2.4" | |
68 | %{py_sitescriptdir}/ipaddress-*.egg-info | |
69 | %endif | |
70 | ||
71 | %if %{with doc} | |
72 | %files apidocs | |
73 | %defattr(644,root,root,755) | |
74 | %doc docs/_build/html/* | |
75 | %endif |