]> git.pld-linux.org Git - packages/python-ifaddr.git/commitdiff
- new master auto/th/python-ifaddr-0.1.7-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 26 Mar 2023 18:50:31 +0000 (20:50 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 26 Mar 2023 18:50:31 +0000 (20:50 +0200)
python-ifaddr.spec [new file with mode: 0644]

diff --git a/python-ifaddr.spec b/python-ifaddr.spec
new file mode 100644 (file)
index 0000000..e63227a
--- /dev/null
@@ -0,0 +1,116 @@
+#
+# Conditional build:
+%bcond_without tests   # unit tests
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary:       Cross-platform network interface and IP address enumeration library
+Summary(pl.UTF-8):     Wieloplatformowa biblioteka do wyliczania interfejsów i adresów IP
+Name:          python-ifaddr
+# keep 0.1.x here for python2 support
+Version:       0.1.7
+Release:       1
+License:       MIT
+Group:         Libraries/Python
+#Source0Download: https://pypi.org/simple/ifaddr/
+Source0:       https://files.pythonhosted.org/packages/source/i/ifaddr/ifaddr-%{version}.tar.gz
+# Source0-md5: 97c4eb7505643b5f1fe17733cb42abd9
+URL:           https://pypi.org/project/ifaddr/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-ipaddress
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.5
+BuildRequires: python3-setuptools
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires:      python-modules >= 1:2.7
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+ifaddr is a small Python library that allows you to find all the IP
+addresses of the computer. It is tested on Linux, OS X, and Windows.
+Other BSD derivatives like OpenBSD, FreeBSD, and NetBSD should work
+too, as well as Solaris/Illumos.
+
+%description -l pl.UTF-8
+ifaddr to mała biblioteka Pythona, pozwalająca uzyskać wszystkie
+adresy IP komputera. Jest testowana na Linuksie, OS X oraz Windows.
+Inne pochodne BSD, jak OpenBSD, FreeBSD i NetBSD powinny także
+działać, podobnie jak Solaris/Illumos.
+
+%package -n python3-ifaddr
+Summary:       Cross-platform network interface and IP address enumeration library
+Summary(pl.UTF-8):     Wieloplatformowa biblioteka do wyliczania interfejsów i adresów IP
+Group:         Libraries/Python
+Requires:      python3-modules >= 1:3.5
+
+%description -n python3-ifaddr
+ifaddr is a small Python library that allows you to find all the IP
+addresses of the computer. It is tested on Linux, OS X, and Windows.
+Other BSD derivatives like OpenBSD, FreeBSD, and NetBSD should work
+too, as well as Solaris/Illumos.
+
+%description -n python3-ifaddr -l pl.UTF-8
+ifaddr to mała biblioteka Pythona, pozwalająca uzyskać wszystkie
+adresy IP komputera. Jest testowana na Linuksie, OS X oraz Windows.
+Inne pochodne BSD, jak OpenBSD, FreeBSD i NetBSD powinny także
+działać, podobnie jak Solaris/Illumos.
+
+%prep
+%setup -q -n ifaddr-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+%{__python} -m unittest discover -s ifaddr
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+%{__python3} -m unittest discover -s ifaddr
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt README.rst
+%{py_sitescriptdir}/ifaddr
+%{py_sitescriptdir}/ifaddr-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-ifaddr
+%defattr(644,root,root,755)
+%doc LICENSE.txt README.rst
+%{py3_sitescriptdir}/ifaddr
+%{py3_sitescriptdir}/ifaddr-%{version}-py*.egg-info
+%endif
This page took 0.103007 seconds and 4 git commands to generate.