#
# spec file for package python-pygeoip
#
# Copyright (c) 2018 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/
#


%bcond_with tests

%define source pygeoip

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-pygeoip
Version:        0.3.2
Release:        1.1
Summary:        Pure Python GeoIP API
License:        Python-2.0
Group:          Development/Languages/Python
URL:            https://github.com/appliedsec/pygeoip
Source:         https://files.pythonhosted.org/packages/ed/65/bb86312b064a6e79c82965202f239850008dbcc9bb24bd0d0bfc7b7bea0b/pygeoip-0.3.2.tar.gz
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildArch:      noarch

%python_subpackages

%description
Pure Python GeoIP API

This library is based on Maxmind’s GeoIP C API.

%prep
%setup -q -n %source-%{version}

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}

%if %{with tests}
%check
%python_expand -m pytest
%endif

%files %{python_files}
%doc README.rst
%{python_sitelib}/*

%changelog
* Sun Feb 18 2018 holgerbruenjes@gmx.net
  first release