diff --git python-pygeoip/python-pygeoip.spec python-pygeoip/python-pygeoip.spec.tmp index 051cb0901d..3eea3c8239 100644 --- python-pygeoip/python-pygeoip.spec +++ python-pygeoip/python-pygeoip.spec.tmp @@ -9,7 +9,7 @@ Name: python-pygeoip Version: 0.2.6 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Pure Python GeoIP API Group: Development/Libraries License: LGPLv3+ @@ -25,54 +25,62 @@ BuildRequires: GeoIP # While this doesn't strictly require GeoIP, it only makes sense # that you would install it alongside this module. -Requires: GeoIP %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-nose %endif -%description -Pure Python GeoIP API based on MaxMind's C-based Python API -but the code itself is ported from the Pure PHP GeoIP API. - -Create your GeoIP instance with appropriate access flag. `STANDARD` reads -data from disk when needed, `MEMORY_CACHE` loads database into memory on -instantiation and `MMAP_CACHE` loads database into memory using mmap. - - import pygeoip - gi = pygeoip.GeoIP('/usr/share/geoip/GeoIP.dat', pygeoip.MEMORY_CACHE) - -Country lookup - - >>> gi.country_code_by_name('google.com') - 'US' - >>> gi.country_code_by_addr('64.233.161.99') - 'US' - >>> gi.country_name_by_addr('64.233.161.99') - 'United States' +%global _description\ +Pure Python GeoIP API based on MaxMind's C-based Python API\ +but the code itself is ported from the Pure PHP GeoIP API.\ +\ +Create your GeoIP instance with appropriate access flag. `STANDARD` reads\ +data from disk when needed, `MEMORY_CACHE` loads database into memory on\ +instantiation and `MMAP_CACHE` loads database into memory using mmap.\ +\ + import pygeoip\ + gi = pygeoip.GeoIP('/usr/share/geoip/GeoIP.dat', pygeoip.MEMORY_CACHE)\ +\ +Country lookup\ +\ + >>> gi.country_code_by_name('google.com')\ + 'US'\ + >>> gi.country_code_by_addr('64.233.161.99')\ + 'US'\ + >>> gi.country_name_by_addr('64.233.161.99')\ + 'United States'\ +\ +City lookup\ +\ + >>> gi = pygeoip.GeoIP('/usr/share/geoip/GeoLiteCity.dat')\ + >>> gi.record_by_addr('64.233.161.99')\ + {\ + 'city': 'Mountain View',\ + 'region_name': 'CA',\ + 'area_code': 650,\ + 'longitude': -122.0574,\ + 'country_code3': 'USA',\ + 'latitude': 37.419199999999989,\ + 'postal_code': '94043',\ + 'dma_code': 807,\ + 'country_code': 'US',\ + 'country_name': 'United States'\ + }\ + >>> gi.time_zone_by_addr('64.233.161.99')\ + 'America/Los_Angeles'\ +\ +For more information, check out the full API documentation at\ +http://packages.python.org/pygeoip. -City lookup +%description %_description - >>> gi = pygeoip.GeoIP('/usr/share/geoip/GeoLiteCity.dat') - >>> gi.record_by_addr('64.233.161.99') - { - 'city': 'Mountain View', - 'region_name': 'CA', - 'area_code': 650, - 'longitude': -122.0574, - 'country_code3': 'USA', - 'latitude': 37.419199999999989, - 'postal_code': '94043', - 'dma_code': 807, - 'country_code': 'US', - 'country_name': 'United States' - } - >>> gi.time_zone_by_addr('64.233.161.99') - 'America/Los_Angeles' +%package -n python2-pygeoip +Summary: %summary +Requires: GeoIP +%{?python_provide:%python_provide python2-pygeoip} -For more information, check out the full API documentation at -http://packages.python.org/pygeoip. +%description -n python2-pygeoip %_description %if 0%{?with_python3} %package -n python3-pygeoip @@ -163,7 +171,7 @@ popd #popd #%%endif -%files +%files -n python2-pygeoip %doc README.md COPYING DEVELOPER INSTALL apidocs/ %{python_sitelib}/%{modname}/ %{python_sitelib}/%{modname}-%{version}* @@ -177,6 +185,10 @@ popd %endif %changelog +* Sat Aug 12 2017 Zbigniew Jędrzejewski-Szmek - 0.2.6-13 +- Python 2 binary package renamed to python2-pygeoip + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + * Thu Jul 27 2017 Fedora Release Engineering - 0.2.6-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild