2017-07-04 07:09:14 +00:00
#
# spec file for package python-geoip2
#
2021-05-14 16:12:24 +00:00
# Copyright (c) 2021 SUSE LLC
2017-07-04 07:09:14 +00:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2018-12-26 23:26:08 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2017-11-04 18:30:28 +00:00
#
2017-07-04 07:09:14 +00:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name : python-geoip2
2021-05-14 16:12:24 +00:00
Version : 4.2.0
2017-07-04 07:09:14 +00:00
Release : 0
Summary : MaxMind GeoIP2 Python API
2017-11-04 18:30:28 +00:00
License : Apache-2.0
2017-07-04 07:09:14 +00:00
Group : Development/Languages/Python
2019-03-12 08:46:19 +00:00
URL : https://github.com/maxmind/GeoIP2-python
2020-03-08 21:22:14 +00:00
Source : https://files.pythonhosted.org/packages/source/g/geoip2/geoip2-%{version} .tar.gz#/%{name}-%{version}.tar.gz
2021-07-13 20:36:37 +00:00
# PATCH-FIX-OPENSUSE 0001-Removing-unused-urllib3-dependency-loosening-request.patch -- Removing unused urllib3 dependency loosening requests version based on https://github.com/maxmind/GeoIP2-python/pull/104.patch
2021-07-13 19:38:29 +00:00
Patch0 : 0001-Removing-unused-urllib3-dependency-loosening-request.patch
2017-07-04 07:09:14 +00:00
BuildRequires : %{python_module setuptools}
2018-06-29 20:27:47 +00:00
BuildRequires : fdupes
2017-11-04 18:30:28 +00:00
BuildRequires : python-rpm-macros
2018-06-29 20:27:47 +00:00
# SECTION test requirements
2020-08-10 06:09:18 +00:00
BuildRequires : %{python_module aiohttp >= 3.6.2}
BuildRequires : %{python_module maxminddb >= 2.0.0}
2021-05-14 16:12:24 +00:00
BuildRequires : %{python_module mocket >= 3.8.9}
2020-08-10 06:09:18 +00:00
BuildRequires : %{python_module python-magic >= 0.4.18}
2021-07-13 19:38:29 +00:00
BuildRequires : %{python_module requests >= 2.14.0}
2017-07-04 07:09:14 +00:00
# /SECTION
2021-07-13 20:36:37 +00:00
Recommends: python-aiohttp >= 3.6.2
2020-08-10 06:09:18 +00:00
Requires : python-maxminddb >= 2.0.0
2021-07-13 19:38:29 +00:00
Requires : python-requests >= 2.14.0
2018-06-29 20:27:47 +00:00
BuildArch : noarch
2017-07-04 07:09:14 +00:00
%if python2
Recommends: python2-ipaddress
%endif
%python_subpackages
%description
This package provides an API for the GeoIP2 web services and databases.
The API also works with MaxMind's free GeoLite2 databases.
%prep
%setup -q -n geoip2-%{version}
2021-07-13 19:38:29 +00:00
%patch0 -p1
2017-07-04 07:09:14 +00:00
%build
%python_build
%install
%python_install
2019-03-12 08:46:19 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
2017-07-04 07:09:14 +00:00
%check
2020-12-10 07:43:01 +00:00
%pyunittest tests/*_test.py -v
2017-07-04 07:09:14 +00:00
%files %{python_files}
2018-05-08 11:36:36 +00:00
%license LICENSE
2019-03-12 08:46:19 +00:00
%doc README.rst HISTORY.rst
2020-12-10 07:43:01 +00:00
%{python_sitelib} /geoip2
%{python_sitelib} /geoip2-%{version} *-info
2017-07-04 07:09:14 +00:00
%changelog