]> git.pld-linux.org Git - packages/python-netifaces.git/blame - python-netifaces.spec
- python-devel required for building ext
[packages/python-netifaces.git] / python-netifaces.spec
CommitLineData
93e083b6
MB
1#
2# Conditional build:
99eedfd5 3%bcond_without tests # unit tests
f6b47641
JR
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
93e083b6 6
f6b47641 7%define module netifaces
93e083b6 8Summary: Python library to retrieve information about network interfaces
99eedfd5 9Summary(pl.UTF-8): Biblioteka Pythona do pobierania informacji o interfejsach sieciowych
93e083b6 10Name: python-%{module}
70fddb3f
AM
11Version: 0.11.0
12Release: 1
93e083b6
MB
13License: MIT
14Group: Development/Languages/Python
99eedfd5
JB
15#Source0Download: https://pypi.org/simple/netifaces/
16Source0: https://files.pythonhosted.org/packages/source/n/netifaces/%{module}-%{version}.tar.gz
70fddb3f
AM
17# Source0-md5: 3146dcb3297dd018ae5eb9a52b440419
18URL: https://pypi.org/project/netifaces/
f6b47641 19%if %{with python2}
5c01a06e 20BuildRequires: python-devel >= 1:2.7
99eedfd5 21BuildRequires: python-setuptools
f6b47641
JR
22%endif
23%if %{with python3}
5c01a06e 24BuildRequires: python3-devel >= 1:3.4
f6b47641
JR
25BuildRequires: python3-setuptools
26%endif
99eedfd5 27BuildRequires: rpmbuild(macros) >= 1.714
93e083b6 28BuildRequires: rpm-pythonprov
99eedfd5 29Requires: python-modules >= 1:2.7
93e083b6
MB
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33This package provides a cross platform API for getting address
34information from network interfaces.
35
99eedfd5
JB
36%description -l pl.UTF-8
37Ten pakiet zapewnia wieloplatformowe API do pobierania informacji o
38adresach z interfejsów sieciowych.
39
f6b47641
JR
40%package -n python3-%{module}
41Summary: Python library to retrieve information about network interfaces
99eedfd5 42Summary(pl.UTF-8): Biblioteka Pythona do pobierania informacji o interfejsach sieciowych
f6b47641 43Group: Libraries/Python
99eedfd5 44Requires: python3-modules >= 1:3.4
f6b47641
JR
45
46%description -n python3-%{module}
47This package provides a cross platform API for getting address
48information from network interfaces.
49
99eedfd5
JB
50%description -n python3-%{module} -l pl.UTF-8
51Ten pakiet zapewnia wieloplatformowe API do pobierania informacji o
52adresach z interfejsów sieciowych.
53
93e083b6
MB
54%prep
55%setup -q -n %{module}-%{version}
56
57%build
f6b47641 58%if %{with python2}
826162f9 59%py_build
99eedfd5 60
93e083b6 61%{?with_tests:%{__python} setup.py test}
f6b47641
JR
62%endif
63
64%if %{with python3}
65%py3_build
99eedfd5 66
f6b47641
JR
67%{?with_tests:%{__python3} setup.py test}
68%endif
93e083b6
MB
69
70%install
71rm -rf $RPM_BUILD_ROOT
f6b47641
JR
72
73%if %{with python2}
826162f9 74%py_install
93e083b6 75
f6b47641
JR
76%py_postclean
77%endif
78
79%if %{with python3}
80%py3_install
81%endif
82
93e083b6
MB
83%clean
84rm -rf $RPM_BUILD_ROOT
85
f6b47641 86%if %{with python2}
93e083b6
MB
87%files
88%defattr(644,root,root,755)
99eedfd5 89%doc LICENSE README.rst
93e083b6 90%attr(755,root,root) %{py_sitedir}/netifaces.so
99eedfd5 91%{py_sitedir}/netifaces-%{version}-py*.egg-info
f6b47641
JR
92%endif
93
94%if %{with python3}
95%files -n python3-%{module}
96%defattr(644,root,root,755)
99eedfd5
JB
97%doc LICENSE README.rst
98%attr(755,root,root) %{py3_sitedir}/netifaces.cpython-*.so
99%{py3_sitedir}/netifaces-%{version}-py*.egg-info
f6b47641 100%endif
This page took 0.208256 seconds and 4 git commands to generate.