[packages/python-netifaces] - pl, cleanup
qboosh
qboosh at pld-linux.org
Sun Mar 26 17:30:03 CEST 2023
commit 99eedfd5a257926d630530b94b0a1818c4ef6ab7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 26 17:32:27 2023 +0200
- pl, cleanup
python-netifaces.spec | 47 ++++++++++++++++++++++++++---------------------
1 file changed, 26 insertions(+), 21 deletions(-)
---
diff --git a/python-netifaces.spec b/python-netifaces.spec
index b9ddda5..4cb16a3 100644
--- a/python-netifaces.spec
+++ b/python-netifaces.spec
@@ -1,56 +1,69 @@
#
# Conditional build:
-%bcond_without tests # do not perform "make test"
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module netifaces
Summary: Python library to retrieve information about network interfaces
+Summary(pl.UTF-8): Biblioteka Pythona do pobierania informacji o interfejsach sieciowych
Name: python-%{module}
Version: 0.11.0
Release: 1
License: MIT
Group: Development/Languages/Python
-Source0: https://pypi.debian.net/netifaces/%{module}-%{version}.tar.gz
+#Source0Download: https://pypi.org/simple/netifaces/
+Source0: https://files.pythonhosted.org/packages/source/n/netifaces/%{module}-%{version}.tar.gz
# Source0-md5: 3146dcb3297dd018ae5eb9a52b440419
URL: https://pypi.org/project/netifaces/
-BuildRequires: rpmbuild(macros) >= 1.710
%if %{with python2}
-BuildRequires: python-devel
-BuildRequires: python-distribute
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
%endif
%if %{with python3}
-BuildRequires: python3-modules
+BuildRequires: python3-modules >= 1:3.4
BuildRequires: python3-setuptools
%endif
+BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: rpm-pythonprov
-Requires: python-modules
+Requires: python-modules >= 1:2.7
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This package provides a cross platform API for getting address
information from network interfaces.
+%description -l pl.UTF-8
+Ten pakiet zapewnia wieloplatformowe API do pobierania informacji o
+adresach z interfejsów sieciowych.
+
%package -n python3-%{module}
Summary: Python library to retrieve information about network interfaces
+Summary(pl.UTF-8): Biblioteka Pythona do pobierania informacji o interfejsach sieciowych
Group: Libraries/Python
-Requires: python3-modules
+Requires: python3-modules >= 1:3.4
%description -n python3-%{module}
This package provides a cross platform API for getting address
information from network interfaces.
+%description -n python3-%{module} -l pl.UTF-8
+Ten pakiet zapewnia wieloplatformowe API do pobierania informacji o
+adresach z interfejsów sieciowych.
+
%prep
%setup -q -n %{module}-%{version}
%build
%if %{with python2}
%py_build
+
%{?with_tests:%{__python} setup.py test}
%endif
%if %{with python3}
%py3_build
+
%{?with_tests:%{__python3} setup.py test}
%endif
@@ -60,12 +73,6 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%py_install
-# when files are installed in other way that standard 'setup.py
-# they need to be (re-)compiled
-# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-
%py_postclean
%endif
@@ -79,17 +86,15 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc README.rst
+%doc LICENSE README.rst
%attr(755,root,root) %{py_sitedir}/netifaces.so
-%if "%{py_ver}" > "2.4"
-%{py_sitedir}/netifaces-*.egg-info
-%endif
+%{py_sitedir}/netifaces-%{version}-py*.egg-info
%endif
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc README.rst
-%{py3_sitedir}/netifaces*.so
-%{py3_sitedir}/%{module}-%{version}-py*.egg-info
+%doc LICENSE README.rst
+%attr(755,root,root) %{py3_sitedir}/netifaces.cpython-*.so
+%{py3_sitedir}/netifaces-%{version}-py*.egg-info
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-netifaces.git/commitdiff/99eedfd5a257926d630530b94b0a1818c4ef6ab7
More information about the pld-cvs-commit
mailing list