From 0cccc807153b76c692d59da0285f69f6bc89b5af Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Jan 24 2020 14:59:17 +0000 Subject: * Sat Jan 11 2020 Fabian Affolter - 1.1.9-1 - Initial package for Fedora --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..25c1fe9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/ipgetter2-1.1.9.zip diff --git a/python-ipgetter2.spec b/python-ipgetter2.spec new file mode 100644 index 0000000..a065414 --- /dev/null +++ b/python-ipgetter2.spec @@ -0,0 +1,77 @@ +%global pypi_name ipgetter2 +%bcond_with network + +Name: python-%{pypi_name} +Version: 1.1.9 +Release: 1%{?dist} +Summary: Python library to fetch your external IP address + +License: ASL 2.0 +URL: https://github.com/starofrainnight/ipgetter2 +Source0: https://github.com/starofrainnight/ipgetter2/archive/%{version}/%{pypi_name}-%{version}.zip +BuildArch: noarch + +%description +Utility to fetch your external IP address. This module is designed to fetch +your external IP address from the internet. It is used mostly when behind +a NAT. It picks your IP randomly from a server list to minimize request +overhead on a single server. + +%package -n python3-%{pypi_name} +Summary: %{summary} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pytest-runner + +%if %{with network} +BuildRequires: python3-chardet +BuildRequires: python3-click +BuildRequires: python3-pytest +BuildRequires: python3-requests +%endif +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +Python library to fetch your external IP address. This module is designed to +fetch your external IP address from the internet. It is used mostly when behind +a NAT. It picks your IP randomly from a server list to minimize request +overhead on a single server. + +%package -n %{pypi_name} +Summary: Utility to fetch your external IP address + +Requires: python3-%{pypi_name} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description -n %{pypi_name} +Utility to fetch your external IP address. + +%prep +%autosetup -n %{pypi_name}-%{version} +rm -rf %{pypi_name}.egg-info +sed -i -e '/^#!\//, 1d' ipgetter2/*.py + +%build +%py3_build + +%install +%py3_install + +%if %{with network} +%check +%{__python3} setup.py test +%endif + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst CONTRIBUTING.rst HISTORY.rst AUTHORS.rst +%{python3_sitelib}/%{pypi_name} +%exclude %{python3_sitelib}/tests +%{python3_sitelib}/%{pypi_name}-%{version}-py*.egg-info + +%files -n %{pypi_name} +%{_bindir}/ipgetter2 + +%changelog +* Sat Jan 11 2020 Fabian Affolter - 1.1.9-1 +- Initial package for Fedora diff --git a/sources b/sources new file mode 100644 index 0000000..a378609 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (ipgetter2-1.1.9.zip) = c268d90752ec5f90a1ddeb6c3adaa1533382d353c1afdd81c28b80e74d4dcfece2601bd785b1173aca16d1c9f636a1cf5387330703005d8de01c015f1d9ea811