File python3-GeoIP.spec of Package python3-GeoIP

#
# spec file for package python3-GeoIP
#
# Copyright (c) 2016 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/
#


%define _name   GeoIP
Name:           python3-GeoIP
Version:        1.3.2
Release:        0
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:  libGeoIP-devel
BuildRequires:  python3-devel

%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.

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

%build
export CFLAGS="%{optflags}"
python3 setup.py build

%install
python3 setup.py install \
  --root=%{buildroot} --prefix=%{_prefix}

%files
%defattr(-,root,root)
%doc LICENSE README.rst
%doc examples/
%{python3_sitearch}/%{_name}*.so
%{python3_sitearch}/%{_name}-*

%changelog
openSUSE Build Service is sponsored by