0cccc80
%global pypi_name ipgetter2
0cccc80
%bcond_with network
0cccc80
0cccc80
Name:           python-%{pypi_name}
58ed472
Version:        1.1.11
162ca38
Release:        8%{?dist}
0cccc80
Summary:        Python library to fetch your external IP address
0cccc80
0cccc80
License:        ASL 2.0
0cccc80
URL:            https://github.com/starofrainnight/ipgetter2
58ed472
Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.zip
0cccc80
BuildArch:      noarch
0cccc80
0cccc80
%description
0cccc80
Utility to fetch your external IP address. This module is designed to fetch
0cccc80
your external IP address from the internet. It is used mostly when behind
0cccc80
a NAT. It picks your IP randomly from a server list to minimize request
0cccc80
overhead on a single server.
0cccc80
0cccc80
%package -n     python3-%{pypi_name}
0cccc80
Summary:        %{summary}
0cccc80
0cccc80
BuildRequires:  python3-devel
0cccc80
BuildRequires:  python3-setuptools
0cccc80
BuildRequires:  python3-pytest-runner
0cccc80
0cccc80
%if %{with network}
0cccc80
BuildRequires:  python3-chardet
0cccc80
BuildRequires:  python3-click
0cccc80
BuildRequires:  python3-pytest
0cccc80
BuildRequires:  python3-requests
0cccc80
%endif
0cccc80
%{?python_provide:%python_provide python3-%{pypi_name}}
0cccc80
 
0cccc80
%description -n python3-%{pypi_name}
0cccc80
Python library to fetch your external IP address. This module is designed to
0cccc80
fetch your external IP address from the internet. It is used mostly when behind
0cccc80
a NAT. It picks your IP randomly from a server list to minimize request
0cccc80
overhead on a single server.
0cccc80
0cccc80
%package -n     %{pypi_name}
0cccc80
Summary:        Utility to fetch your external IP address
0cccc80
0cccc80
Requires:       python3-%{pypi_name} = %{?epoch:%{epoch}:}%{version}-%{release}
0cccc80
 
0cccc80
%description -n %{pypi_name}
0cccc80
Utility to fetch your external IP address.
0cccc80
0cccc80
%prep
0cccc80
%autosetup -n %{pypi_name}-%{version}
0cccc80
rm -rf %{pypi_name}.egg-info
0cccc80
sed -i -e '/^#!\//, 1d' ipgetter2/*.py
0cccc80
0cccc80
%build
0cccc80
%py3_build
0cccc80
0cccc80
%install
0cccc80
%py3_install
0cccc80
0cccc80
%if %{with network}
0cccc80
%check
0cccc80
%{__python3} setup.py test
0cccc80
%endif
0cccc80
0cccc80
%files -n python3-%{pypi_name}
0cccc80
%license LICENSE
0cccc80
%doc README.rst CONTRIBUTING.rst HISTORY.rst AUTHORS.rst
0cccc80
%{python3_sitelib}/%{pypi_name}
0cccc80
%exclude %{python3_sitelib}/tests
0cccc80
%{python3_sitelib}/%{pypi_name}-%{version}-py*.egg-info
0cccc80
0cccc80
%files -n %{pypi_name}
0cccc80
%{_bindir}/ipgetter2
0cccc80
0cccc80
%changelog
162ca38
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.11-8
162ca38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
162ca38
268753c
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.11-7
268753c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
268753c
d28fd8e
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.1.11-6
d28fd8e
- Rebuilt for Python 3.11
d28fd8e
4e18850
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.11-5
4e18850
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
4e18850
28fcdea
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.11-4
28fcdea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
28fcdea
8959f17
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.1.11-3
8959f17
- Rebuilt for Python 3.10
8959f17
91cefd1
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.11-2
91cefd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
91cefd1
58ed472
* Thu Oct 08 2020 Fabian Affolter <mail@fabian-affolter.ch> - 1.1.11-1
58ed472
- Update to latest upstream release 1.1.11
58ed472
24a7e63
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.9-4
24a7e63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
24a7e63
b9e21bc
* Tue May 26 2020 Miro HronĨok <mhroncok@redhat.com> - 1.1.9-3
b9e21bc
- Rebuilt for Python 3.9
b9e21bc
14ee730
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.9-2
14ee730
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
14ee730
0cccc80
* Sat Jan 11 2020 Fabian Affolter <mail@fabian-affolter.ch> - 1.1.9-1
58ed472
- Initial package for Fedora