]> git.pld-linux.org Git - packages/python-netifaces.git/blame - python-netifaces.spec
rebuild with python 3.10
[packages/python-netifaces.git] / python-netifaces.spec
CommitLineData
93e083b6
MB
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
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
MB
8Summary: Python library to retrieve information about network interfaces
9Name: python-%{module}
f6b47641 10Version: 0.10.5
222a476a 11Release: 7
93e083b6
MB
12License: MIT
13Group: Development/Languages/Python
f6b47641
JR
14Source0: https://files.pythonhosted.org/packages/source/n/%{module}/%{module}-%{version}.tar.gz
15# Source0-md5: 5b4d1f1310ed279e6df27ef3a9b71519
16URL: https://alastairs-place.net/projects/netifaces/
6cc600a9 17BuildRequires: rpmbuild(macros) >= 1.710
f6b47641 18%if %{with python2}
93e083b6
MB
19BuildRequires: python-devel
20BuildRequires: python-distribute
f6b47641
JR
21%endif
22%if %{with python3}
23BuildRequires: python3-modules
24BuildRequires: python3-setuptools
25%endif
93e083b6
MB
26BuildRequires: rpm-pythonprov
27Requires: python-modules
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31This package provides a cross platform API for getting address
32information from network interfaces.
33
f6b47641
JR
34%package -n python3-%{module}
35Summary: Python library to retrieve information about network interfaces
36Group: Libraries/Python
37Requires: python3-modules
38
39%description -n python3-%{module}
40This package provides a cross platform API for getting address
41information from network interfaces.
42
93e083b6
MB
43%prep
44%setup -q -n %{module}-%{version}
45
46%build
f6b47641 47%if %{with python2}
826162f9 48%py_build
93e083b6 49%{?with_tests:%{__python} setup.py test}
f6b47641
JR
50%endif
51
52%if %{with python3}
53%py3_build
54%{?with_tests:%{__python3} setup.py test}
55%endif
93e083b6
MB
56
57%install
58rm -rf $RPM_BUILD_ROOT
f6b47641
JR
59
60%if %{with python2}
826162f9 61%py_install
93e083b6 62
f6b47641
JR
63# when files are installed in other way that standard 'setup.py
64# they need to be (re-)compiled
65# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
66%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
67%py_comp $RPM_BUILD_ROOT%{py_sitedir}
68
69%py_postclean
70%endif
71
72%if %{with python3}
73%py3_install
74%endif
75
93e083b6
MB
76%clean
77rm -rf $RPM_BUILD_ROOT
78
f6b47641 79%if %{with python2}
93e083b6
MB
80%files
81%defattr(644,root,root,755)
f6b47641 82%doc README.rst
93e083b6
MB
83%attr(755,root,root) %{py_sitedir}/netifaces.so
84%if "%{py_ver}" > "2.4"
85%{py_sitedir}/netifaces-*.egg-info
86%endif
f6b47641
JR
87%endif
88
89%if %{with python3}
90%files -n python3-%{module}
91%defattr(644,root,root,755)
92%doc README.rst
93%{py3_sitedir}/netifaces*.so
94%{py3_sitedir}/%{module}-%{version}-py*.egg-info
95%endif
This page took 0.097091 seconds and 4 git commands to generate.