]> git.pld-linux.org Git - packages/python-ipwhois.git/blame - python-ipwhois.spec
rebuild with python 3.10
[packages/python-ipwhois.git] / python-ipwhois.spec
CommitLineData
ceaf3787
AM
1# Conditional build:
2%bcond_without python2 # CPython 2.x module
3%bcond_without python3 # CPython 3.x module
4
5%define module ipwhois
6%define egg_name ipwhois
7%define pypi_name ipwhois
8Summary: Retrieve and parse whois data for IPv4 and IPv6 addresses
9Name: python-%{module}
10Version: 1.2.0
b3abdc7f 11Release: 3
ceaf3787
AM
12License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
13Group: Libraries/Python
14Source0: https://pypi.debian.net/ipwhois/ipwhois-1.2.0.tar.gz
15# Source0-md5: 29c322d1c812793a48378b738f6e9b04
16Patch0: python.patch
17URL: https://github.com/secynic/ipwhois
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.5
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3-modules >= 1:3.2
24BuildRequires: python3-setuptools
25%endif
26BuildRequires: rpm-pythonprov
27BuildRequires: rpmbuild(macros) >= 1.714
28Requires: python-modules >= 1:2.5
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33pwhois is a Python package focused on retrieving and parsing whois data for IPv4 and IPv6 addresses.
34
35%package -n python3-%{module}
36Summary: Retrieve and parse whois data for IPv4 and IPv6 addresses
37Group: Libraries/Python
38Requires: python3-modules >= 1:3.2
39
40%description -n python3-%{module}
41pwhois is a Python package focused on retrieving and parsing whois data for IPv4 and IPv6 addresses.
42
43%prep
44%setup -q -n %{pypi_name}-%{version}
45%patch0 -p1
46
47%build
48%if %{with python2}
49%py_build
50%endif
51
52%if %{with python3}
53%py3_build
54%endif
55
56%install
57rm -rf $RPM_BUILD_ROOT
58
59%if %{with python2}
60%py_install
61%py_postclean
62%endif
63
64%if %{with python3}
65%py3_install
66%endif
67
68%clean
69rm -rf $RPM_BUILD_ROOT
70
71%if %{with python2}
72%files
73%defattr(644,root,root,755)
74%doc *.rst
75%{py_sitescriptdir}/%{module}
76%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
77%endif
78
79%if %{with python3}
80%files -n python3-%{module}
81%defattr(644,root,root,755)
82%doc *.rst
83%attr(755,root,root) %{_bindir}/ipwhois_cli.py
84%attr(755,root,root) %{_bindir}/ipwhois_utils_cli.py
85%{py3_sitescriptdir}/%{module}
86%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
87%endif
This page took 0.124654 seconds and 4 git commands to generate.