# # spec file for package python-geoip2 # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # 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. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without test %define skip_python2 1 Name: python-geoip2 Version: 3.0.0 Release: 1.1 Summary: MaxMind GeoIP2 Python API License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/maxmind/GeoIP2-python Source: https://files.pythonhosted.org/packages/source/g/geoip2/geoip2-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module maxminddb >= 1.5.2} BuildRequires: %{python_module requests >= 2.22.0} BuildRequires: %{python_module requests-mock >= 0.5} # /SECTION Requires: python-maxminddb >= 1.5.2 Requires: python-requests >= 2.22.0 Requires: python-urllib3 >= 1.25.2 BuildArch: noarch %ifpython2 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-python-%{version} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec setup.py test %files %{python_files} %license LICENSE %doc README.rst HISTORY.rst %{python_sitelib}/* %changelog * Mon Mar 11 2019 John Vandenberg - Fix minimum build dependency of maxminddb - Fix fdupes - Use more useful GitHub repo as URL - Add HISTORY.rst to %%doc * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Sun May 27 2018 sebix+novell.com@sebix.at - update to version 2.9.0: * You may now pass in the database via a file descriptor rather than a file name when creating a new ``geoip2.database.Reader`` object using ``MODE_FD``. This will read the database from the file descriptor into memory. Pull request by nkinkade. GitHub #53. * Wed May 2 2018 tchvatal@suse.com - Use license macro for license * Thu Apr 12 2018 sebix+novell.com@sebix.at - update to version 2.8.0: * Renamed user ID to account ID in the code and added support for the new ``ACCOUNT_ID_REQUIRED`` AND ``ACCOUNT_ID_UNKNOWN`` error codes. - update to version 2.7.0: * The ``is_in_european_union`` attribute was added to ``geoip2.record.Country`` and ``geoip2.record.RepresentedCountry``. This attribute is ``True`` if the country is a member state of the European Union. * Sat Mar 3 2018 arun@gmx.de - specfile: * update copyright year * don't use python_module for Requires * Fri Oct 27 2017 sebix+novell.com@sebix.at - update to version 2.6.0: * The following new anonymizer attributes were added to ``geoip2.record.Traits`` for use with GeoIP2 Precision Insights: ``is_anonymous``, ``is_anonymous_vpn``, ``is_hosting_provider``, ``is_public_proxy``, and ``is_tor_exit_node``. * Thu May 25 2017 sebix+novell.com@sebix.at - initial package