[packages/python-ipwhois] Initial.

arekm arekm at pld-linux.org
Tue Jan 25 10:31:50 CET 2022


commit ceaf3787409b3f6da5cc04e2204f27a4b2e302f7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Jan 25 10:31:01 2022 +0100

    Initial.

 python-ipwhois.spec | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 python.patch        | 27 +++++++++++++++++
 2 files changed, 114 insertions(+)
---
diff --git a/python-ipwhois.spec b/python-ipwhois.spec
new file mode 100644
index 0000000..2bd7eaf
--- /dev/null
+++ b/python-ipwhois.spec
@@ -0,0 +1,87 @@
+# Conditional build:
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+%define		module		ipwhois
+%define		egg_name	ipwhois
+%define		pypi_name	ipwhois
+Summary:	Retrieve and parse whois data for IPv4 and IPv6 addresses
+Name:		python-%{module}
+Version:	1.2.0
+Release:	1
+License:	- (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
+Group:		Libraries/Python
+Source0:	https://pypi.debian.net/ipwhois/ipwhois-1.2.0.tar.gz
+# Source0-md5:	29c322d1c812793a48378b738f6e9b04
+Patch0:		python.patch
+URL:		https://github.com/secynic/ipwhois
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.5
+BuildRequires:	python-setuptools
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.2
+BuildRequires:	python3-setuptools
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python-modules >= 1:2.5
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+pwhois is a Python package focused on retrieving and parsing whois data for IPv4 and IPv6 addresses.
+
+%package -n python3-%{module}
+Summary:	Retrieve and parse whois data for IPv4 and IPv6 addresses
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.2
+
+%description -n python3-%{module}
+pwhois is a Python package focused on retrieving and parsing whois data for IPv4 and IPv6 addresses.
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+%patch0 -p1
+
+%build
+%if %{with python2}
+%py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%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 *.rst
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc *.rst
+%attr(755,root,root) %{_bindir}/ipwhois_cli.py
+%attr(755,root,root) %{_bindir}/ipwhois_utils_cli.py
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%endif
diff --git a/python.patch b/python.patch
new file mode 100644
index 0000000..7295e54
--- /dev/null
+++ b/python.patch
@@ -0,0 +1,27 @@
+--- ipwhois-1.2.0/setup.py~	2020-09-17 20:58:26.000000000 +0200
++++ ipwhois-1.2.0/setup.py	2022-01-25 10:26:32.086556142 +0100
+@@ -67,7 +67,7 @@ PACKAGES = ['ipwhois']
+ 
+ PACKAGE_DATA = {'ipwhois': ['data/*.xml', 'data/*.csv']}
+ 
+-INSTALL_REQUIRES = ['dnspython<=2.0.0', 'ipaddr==2.2.0;python_version<"3.3"']
++INSTALL_REQUIRES = ['dnspython', 'ipaddr==2.2.0;python_version<"3.3"']
+ 
+ setup(
+     name=NAME,
+--- ipwhois-1.2.0/ipwhois/scripts/ipwhois_cli.py~	2020-09-17 20:58:26.000000000 +0200
++++ ipwhois-1.2.0/ipwhois/scripts/ipwhois_cli.py	2022-01-25 10:28:25.753222795 +0100
+@@ -1,3 +1,5 @@
++#!/usr/bin/python3
++
+ # Copyright (c) 2013-2020 Philip Hane
+ # All rights reserved.
+ #
+--- ipwhois-1.2.0/ipwhois/scripts/ipwhois_utils_cli.py~	2020-09-17 20:58:26.000000000 +0200
++++ ipwhois-1.2.0/ipwhois/scripts/ipwhois_utils_cli.py	2022-01-25 10:29:29.213222774 +0100
+@@ -1,3 +1,5 @@
++#!/usr/bin/python3
++
+ # Copyright (c) 2013-2020 Philip Hane
+ # All rights reserved.
+ #
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-ipwhois.git/commitdiff/ceaf3787409b3f6da5cc04e2204f27a4b2e302f7



More information about the pld-cvs-commit mailing list