# # spec file for package python-GeoIP # # Copyright (c) 2017 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 http://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python %define _name GeoIP %define skip_python3 1 Name: python-GeoIP Version: 1.3.2 Release: 2.8 Summary: Python bindings for the GeoIP geographical lookup libraries License: LGPL-2.1+ Group: Development/Languages/Python Url: https://github.com/maxmind/geoip-api-python Source: https://files.pythonhosted.org/packages/source/G/%{_name}/%{_name}-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: libGeoIP-devel BuildRequires: python-rpm-macros %ifpython2 # python-GeoIP was last used in openSUSE Leap 14.2. Provides: %{oldpython}-GeoIP = %{version} Obsoletes: %{oldpython}-GeoIP < %{version} %endif %description This package contains the Python bindings for the GeoIP API, allowing IP to location lookups to country, city and organisation level within Python code. %python_subpackages %prep %setup -q -n %{_name}-%{version} %build export CFLAGS="%{optflags}" %python_build %install %python_install %files %{python_files} %defattr(-,root,root) %doc LICENSE README.rst %doc examples/ %{python_sitearch}/%{_name}*.so %{python_sitearch}/%{_name}-%{version}-py%{python_version}.egg-info %changelog * Tue May 2 2017 sor.alexei@meowr.ru - Update for the multipython build. * Wed Jul 20 2016 sor.alexei@meowr.ru - Update to version 1.3.2 (changes since 1.2.1): * Python 3 support and significant code cleanup. * Update test_city.py and test_region.py. * Add region_name to GeoIPRegion. * Add database_info and database_edition attributes to GeoIP object. * Add region_name and time_zone keys to GeoIPRecord wrapper. * Export the country list, country code -> country name mapping, and country->continent mapping. * Raise country code counter from 251 to 253. * record_by_addr and record_by_name return None instead of throwing a exception. See test_city.py. * Add a py_geoip.error Exception object. * Export the country list, country code -> country name mapping, and country->continent mapping. * Update test.py - replace www.government.de with www.bundestag.de. * Add range_by_ip - returns largest start and stop ip for any ip. Remember to use a IP not a name. * Add range_by_ip example. * Add metro_code as a alias for the depreciated dma_code. * Add charset and set_charset methods, as well as the new attributes GeoIP.GEOIP_CHARSET_ISO_8859_1 and GeoIP.GEOIP_CHARSET_UTF8. * Add test_city_charset.py script showing howto use charset and set_charset. * Add last_netmask. * Fix compile warnings. * Fix small memoryleak in database_info, org_by_name and org_by_addr. * Remove dma_code from test_city.py example. * Remove Confidence and Accuracy Database, it is unused anyway. * Add new methods enable_teredo, teredo, time_zone_by_country_and_region and lib_version. * Add support for Confidence and Accuracy Database. * Add support for Netspeed Database. via: id_by_addr id_by_name. * Add IPv6 glue (needs libGeoIP 1.4.7): + country_code_by_name_v6; + country_name_by_name_v6; + country_code_by_addr_v6; + country_name_by_addr_v6. * Add new methods record_by_name_v6 and record_by_addr_v6 to support GeoIPCityv6 databases. * Fix low memory error handling and refcount issues on error. * Add example test_netspeedcell.py. * The methods name_by_addr, name_by_addr_v6, name_by_name, and name_by_name_v6 were added for ISP, Org, and ASNum lookups. * Portability fixes. * Expose GEOIP_MMAP_CACHE from the C library. * Unit tests were added. * The description for org_by_name incorrectly directed people to use name_by_addr rather than name_by_name. * Previously GeoIP.country_names was populated from GeoIP_country_name in the libGeoIP C API. Some versions of the libGeoIP include non-ASCII ISO-8859-1 characters in these names, causing encoding errors under Python * Changed licence to LGPLv2+ from GPLv2+. - Correct RPM group: Development/Languages/Python. - Package examples instead of tests. - Spec cleanup. * Sun Jan 28 2007 judas_iscariote@shorewall.net - now GeoIP-devel is needed. * Thu Dec 7 2006 poeml@cmdline.net - import 1.2.1 from FC6 extra