commit python-maxminddb for openSUSE:Factory

2020-08-25 Thread root
Hello community,

here is the log from the commit of package python-maxminddb for 
openSUSE:Factory checked in at 2020-08-25 12:37:02

Comparing /work/SRC/openSUSE:Factory/python-maxminddb (Old)
 and  /work/SRC/openSUSE:Factory/.python-maxminddb.new.3399 (New)


Package is "python-maxminddb"

Tue Aug 25 12:37:02 2020 rev:9 rq:827063 version:2.0.2

Changes:

--- /work/SRC/openSUSE:Factory/python-maxminddb/python-maxminddb.changes
2020-08-04 20:17:46.128912653 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-maxminddb.new.3399/python-maxminddb.changes  
2020-08-25 12:37:03.421385339 +0200
@@ -1,0 +2,5 @@
+Sun Aug 16 14:12:17 UTC 2020 - John Vandenberg 
+
+- Replace nose with pytest
+
+---



Other differences:
--
++ python-maxminddb.spec ++
--- /var/tmp/diff_new_pack.PK0mGl/_old  2020-08-25 12:37:05.377386302 +0200
+++ /var/tmp/diff_new_pack.PK0mGl/_new  2020-08-25 12:37:05.381386304 +0200
@@ -35,7 +35,7 @@
 %endif
 # SECTION test requirements
 BuildRequires:  %{python_module mock}
-BuildRequires:  %{python_module nose}
+BuildRequires:  %{python_module pytest}
 # /SECTION
 %python_subpackages
 
@@ -48,6 +48,7 @@
 
 %prep
 %setup -q -n maxminddb-%{version}
+sed -i '/nose/d' setup.py
 
 %build
 export CFLAGS="%{optflags}"
@@ -58,7 +59,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitearch}
 
 %check
-%python_exec setup.py test
+%pytest_arch
 
 %files %{python_files}
 %license LICENSE




commit python-maxminddb for openSUSE:Factory

2020-08-04 Thread root
Hello community,

here is the log from the commit of package python-maxminddb for 
openSUSE:Factory checked in at 2020-08-04 20:17:28

Comparing /work/SRC/openSUSE:Factory/python-maxminddb (Old)
 and  /work/SRC/openSUSE:Factory/.python-maxminddb.new.3592 (New)


Package is "python-maxminddb"

Tue Aug  4 20:17:28 2020 rev:8 rq:823983 version:2.0.2

Changes:

--- /work/SRC/openSUSE:Factory/python-maxminddb/python-maxminddb.changes
2020-05-28 09:06:07.851485215 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-maxminddb.new.3592/python-maxminddb.changes  
2020-08-04 20:17:46.128912653 +0200
@@ -1,0 +2,17 @@
+Tue Jul 28 18:51:50 UTC 2020 - Sebastian Wagner 
+
+- update to version 2.0.2:
+  - Added ``py.typed`` file per PEP 561. Reported by Árni Már Jónsson.
+
+---
+Thu Jul 23 18:32:07 UTC 2020 - Sebastian Wagner 
+
+- update to version 2.0.1:
+ - Fix minimum required python version in ``setup.py``. Pull request by
+   Boros Gábor. GitHub #69 & #70.
+- update to version 2.0.0:
+ - IMPORTANT: Python 3.6 or greater is required. If you are using an older
+   version, please use a 1.x.x release.
+ - Type hints have been added.
+
+---

Old:

  maxminddb-1.5.4.tar.gz

New:

  maxminddb-2.0.2.tar.gz



Other differences:
--
++ python-maxminddb.spec ++
--- /var/tmp/diff_new_pack.AlJrJS/_old  2020-08-04 20:17:47.968913485 +0200
+++ /var/tmp/diff_new_pack.AlJrJS/_new  2020-08-04 20:17:47.968913485 +0200
@@ -19,13 +19,13 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without python2
 Name:   python-maxminddb
-Version:1.5.4
+Version:2.0.2
 Release:0
 Summary:Reader for the MaxMind DB format
 License:Apache-2.0
 URL:http://www.maxmind.com/
 Source: 
https://files.pythonhosted.org/packages/source/m/maxminddb/maxminddb-%{version}.tar.gz
-BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module devel >= 3.6}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  libmaxminddb-devel
@@ -37,9 +37,6 @@
 BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module nose}
 # /SECTION
-%ifpython2
-Requires:   python-ipaddress
-%endif
 %python_subpackages
 
 %description

++ maxminddb-1.5.4.tar.gz -> maxminddb-2.0.2.tar.gz ++
 23609 lines of diff (skipped)




commit python-maxminddb for openSUSE:Factory

2020-05-28 Thread root
Hello community,

here is the log from the commit of package python-maxminddb for 
openSUSE:Factory checked in at 2020-05-28 09:06:04

Comparing /work/SRC/openSUSE:Factory/python-maxminddb (Old)
 and  /work/SRC/openSUSE:Factory/.python-maxminddb.new.3606 (New)


Package is "python-maxminddb"

Thu May 28 09:06:04 2020 rev:7 rq:805662 version:1.5.4

Changes:

--- /work/SRC/openSUSE:Factory/python-maxminddb/python-maxminddb.changes
2020-03-27 00:23:41.204207850 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-maxminddb.new.3606/python-maxminddb.changes  
2020-05-28 09:06:07.851485215 +0200
@@ -1,0 +2,10 @@
+Thu May  7 18:17:12 UTC 2020 - Sebastian Wagner 
+
+- update to version 1.5.4:
+ - 1.5.3 was missing a test database. This release adds the test file.
+   There are no other changes. Reported by Lumír 'Frenzy' Balhar. GitHub #60.
+- update to version 1.5.3:
+ - Fix a segfault when decoding a database with a corrupt data section.
+   Reported by Robert Scott. GitHub #58.
+
+---

Old:

  maxminddb-1.5.2.tar.gz

New:

  maxminddb-1.5.4.tar.gz



Other differences:
--
++ python-maxminddb.spec ++
--- /var/tmp/diff_new_pack.HLLEKe/_old  2020-05-28 09:06:08.831488154 +0200
+++ /var/tmp/diff_new_pack.HLLEKe/_new  2020-05-28 09:06:08.835488166 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without python2
 Name:   python-maxminddb
-Version:1.5.2
+Version:1.5.4
 Release:0
 Summary:Reader for the MaxMind DB format
 License:Apache-2.0

++ maxminddb-1.5.2.tar.gz -> maxminddb-1.5.4.tar.gz ++
 2511 lines of diff (skipped)




commit python-maxminddb for openSUSE:Factory

2020-03-26 Thread root
Hello community,

here is the log from the commit of package python-maxminddb for 
openSUSE:Factory checked in at 2020-03-27 00:23:38

Comparing /work/SRC/openSUSE:Factory/python-maxminddb (Old)
 and  /work/SRC/openSUSE:Factory/.python-maxminddb.new.3160 (New)


Package is "python-maxminddb"

Fri Mar 27 00:23:38 2020 rev:6 rq:784814 version:1.5.2

Changes:

--- /work/SRC/openSUSE:Factory/python-maxminddb/python-maxminddb.changes
2020-01-16 18:13:14.844703519 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-maxminddb.new.3160/python-maxminddb.changes  
2020-03-27 00:23:41.204207850 +0100
@@ -1,0 +2,5 @@
+Sat Mar 14 08:03:28 UTC 2020 - Tomáš Chvátal 
+
+- Fix build without python2
+
+---



Other differences:
--
++ python-maxminddb.spec ++
--- /var/tmp/diff_new_pack.R6CdKE/_old  2020-03-27 00:23:41.976208241 +0100
+++ /var/tmp/diff_new_pack.R6CdKE/_new  2020-03-27 00:23:41.980208244 +0100
@@ -17,12 +17,12 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%bcond_without python2
 Name:   python-maxminddb
 Version:1.5.2
 Release:0
 Summary:Reader for the MaxMind DB format
 License:Apache-2.0
-Group:  Development/Languages/Python
 URL:http://www.maxmind.com/
 Source: 
https://files.pythonhosted.org/packages/source/m/maxminddb/maxminddb-%{version}.tar.gz
 BuildRequires:  %{python_module devel}
@@ -30,13 +30,15 @@
 BuildRequires:  fdupes
 BuildRequires:  libmaxminddb-devel
 BuildRequires:  python-rpm-macros
-BuildRequires:  python2-ipaddress
+%if %{with python2}
+BuildRequires:  python-ipaddress
+%endif
 # SECTION test requirements
 BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module nose}
 # /SECTION
 %ifpython2
-Requires:   python2-ipaddress
+Requires:   python-ipaddress
 %endif
 %python_subpackages
 




commit python-maxminddb for openSUSE:Factory

2020-01-16 Thread root
Hello community,

here is the log from the commit of package python-maxminddb for 
openSUSE:Factory checked in at 2020-01-16 18:13:12

Comparing /work/SRC/openSUSE:Factory/python-maxminddb (Old)
 and  /work/SRC/openSUSE:Factory/.python-maxminddb.new.26092 (New)


Package is "python-maxminddb"

Thu Jan 16 18:13:12 2020 rev:5 rq:761128 version:1.5.2

Changes:

--- /work/SRC/openSUSE:Factory/python-maxminddb/python-maxminddb.changes
2019-11-04 17:05:20.560192943 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-maxminddb.new.26092/python-maxminddb.changes 
2020-01-16 18:13:14.844703519 +0100
@@ -1,0 +2,6 @@
+Wed Jan  1 11:06:52 UTC 2020 - Sebastian Wagner 
+
+- update to version 1.5.2:
+  - Minor performance improvements in the pure Python reader.
+
+---

Old:

  maxminddb-1.5.1.tar.gz

New:

  maxminddb-1.5.2.tar.gz



Other differences:
--
++ python-maxminddb.spec ++
--- /var/tmp/diff_new_pack.oPkTng/_old  2020-01-16 18:13:15.392703829 +0100
+++ /var/tmp/diff_new_pack.oPkTng/_new  2020-01-16 18:13:15.392703829 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-maxminddb
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:   python-maxminddb
-Version:1.5.1
+Version:1.5.2
 Release:0
 Summary:Reader for the MaxMind DB format
 License:Apache-2.0

++ maxminddb-1.5.1.tar.gz -> maxminddb-1.5.2.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maxminddb-1.5.1/HISTORY.rst 
new/maxminddb-1.5.2/HISTORY.rst
--- old/maxminddb-1.5.1/HISTORY.rst 2019-09-27 22:56:02.0 +0200
+++ new/maxminddb-1.5.2/HISTORY.rst 2019-12-20 19:42:54.0 +0100
@@ -3,6 +3,11 @@
 History
 ---
 
+1.5.2 (2019-12-20)
+++
+
+* Minor performance improvements in the pure Python reader.
+
 1.5.1 (2019-09-27)
 ++
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maxminddb-1.5.1/PKG-INFO new/maxminddb-1.5.2/PKG-INFO
--- old/maxminddb-1.5.1/PKG-INFO2019-09-27 23:12:48.0 +0200
+++ new/maxminddb-1.5.2/PKG-INFO2019-12-20 19:44:00.401256000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: maxminddb
-Version: 1.5.1
+Version: 1.5.2
 Summary: Reader for the MaxMind DB format
 Home-page: http://www.maxmind.com/
 Author: Gregory Oschwald
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maxminddb-1.5.1/docs/html/.buildinfo 
new/maxminddb-1.5.2/docs/html/.buildinfo
--- old/maxminddb-1.5.1/docs/html/.buildinfo2019-09-27 23:12:47.0 
+0200
+++ new/maxminddb-1.5.2/docs/html/.buildinfo2019-12-20 19:44:00.0 
+0100
@@ -1,4 +1,4 @@
 # Sphinx build info version 1
 # This file hashes the configuration used when building these files. When it 
is not found, a full rebuild will be done.
-config: ecfe08bc9a986f3303b79dd022312589
+config: f4b35ba4b456e07a1fe93fc0f298d57b
 tags: 645f666f9bcd5a90fca523b33c5a78b7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maxminddb-1.5.1/docs/html/_static/basic.css 
new/maxminddb-1.5.2/docs/html/_static/basic.css
--- old/maxminddb-1.5.1/docs/html/_static/basic.css 2019-09-27 
23:12:47.0 +0200
+++ new/maxminddb-1.5.2/docs/html/_static/basic.css 2019-12-20 
19:44:00.0 +0100
@@ -672,6 +672,10 @@
 margin-top: 0;
 }
 
+div.doctest > div.highlight span.gp {  /* gp: Generic.Prompt */
+user-select: none;
+}
+
 div.code-block-caption span.caption-number {
 padding: 0.1em 0.3em;
 font-style: italic;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/maxminddb-1.5.1/docs/html/_static/documentation_options.js 
new/maxminddb-1.5.2/docs/html/_static/documentation_options.js
--- old/maxminddb-1.5.1/docs/html/_static/documentation_options.js  
2019-09-27 23:12:47.0 +0200
+++ new/maxminddb-1.5.2/docs/html/_static/documentation_options.js  
2019-12-20 19:44:00.0 +0100
@@ -1,8 +1,9 @@
 var DOCUMENTATION_OPTIONS = {
 URL_ROOT: 
document.getElementById("documentation_options").getAttribute('data-url_root'),
-VERSION: '1.5.1',
+VERSION: '1.5.2',
 LANGUAGE: 'None',
 COLLAPSE_INDEX: false,
+BUILDER: 'html',
 FILE_SUFFIX: '.html',
 HAS_SOURCE: true,
 

commit python-maxminddb for openSUSE:Factory

2019-11-04 Thread root
Hello community,

here is the log from the commit of package python-maxminddb for 
openSUSE:Factory checked in at 2019-11-04 17:05:19

Comparing /work/SRC/openSUSE:Factory/python-maxminddb (Old)
 and  /work/SRC/openSUSE:Factory/.python-maxminddb.new.2990 (New)


Package is "python-maxminddb"

Mon Nov  4 17:05:19 2019 rev:4 rq:738122 version:1.5.1

Changes:

--- /work/SRC/openSUSE:Factory/python-maxminddb/python-maxminddb.changes
2018-08-31 10:46:39.123362684 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-maxminddb.new.2990/python-maxminddb.changes  
2019-11-04 17:05:20.560192943 +0100
@@ -1,0 +2,18 @@
+Sun Oct  6 18:06:53 UTC 2019 - Sebastian Wagner 
+
+- update to version 1.5.1:
+  - Fix a possible segfault due to not correctly incrementing the reference
+on a returned object.
+- update to version 1.5.0:
+  - Python 3.3 and 3.4 are no longer supported.
+  - The extension source directory was moved to prevent an ``ImportWarning``
+when importing the module on Python 2 with ``-Wdefault`` set. Reported by
+David Szotten and Craig de Stigter. GitHub #31.
+  - The ``get`` method now accepts ``ipaddress.IPv4Address`` and
+``ipaddress.IPv6Address`` objects in addition to strings.  This works with
+both the pure Python implementation as well as the extension. Based on a
+pull request #48 by Eric Pruitt. GitHub #50.
+  - A new method, ``get_with_prefix_len``, was added. This method returns a
+tuple containing the record and the prefix length.
+
+---

Old:

  maxminddb-1.4.1.tar.gz

New:

  maxminddb-1.5.1.tar.gz



Other differences:
--
++ python-maxminddb.spec ++
--- /var/tmp/diff_new_pack.VcNxFZ/_old  2019-11-04 17:05:21.816194285 +0100
+++ /var/tmp/diff_new_pack.VcNxFZ/_new  2019-11-04 17:05:21.844194315 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-maxminddb
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# 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
@@ -12,13 +12,13 @@
 # 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/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:   python-maxminddb
-Version:1.4.1
+Version:1.5.1
 Release:0
 Summary:Reader for the MaxMind DB format
 License:Apache-2.0
@@ -56,7 +56,6 @@
 
 %install
 %python_install
-%python_expand rm 
%{buildroot}%{$python_sitearch}/maxminddb/extension/maxminddb.c
 %python_expand %fdupes %{buildroot}%{$python_sitearch}
 
 %check

++ maxminddb-1.4.1.tar.gz -> maxminddb-1.5.1.tar.gz ++
 26192 lines of diff (skipped)




commit python-maxminddb for openSUSE:Factory

2018-08-31 Thread root


bin20djTNflaX.bin
Description: Binary data


commit python-maxminddb for openSUSE:Factory

2018-06-29 Thread root
Hello community,

here is the log from the commit of package python-maxminddb for 
openSUSE:Factory checked in at 2018-06-29 22:23:14

Comparing /work/SRC/openSUSE:Factory/python-maxminddb (Old)
 and  /work/SRC/openSUSE:Factory/.python-maxminddb.new (New)


Package is "python-maxminddb"

Fri Jun 29 22:23:14 2018 rev:2 rq:617160 version:1.4.0

Changes:

--- /work/SRC/openSUSE:Factory/python-maxminddb/python-maxminddb.changes
2017-06-20 09:39:10.614375581 +0200
+++ /work/SRC/openSUSE:Factory/.python-maxminddb.new/python-maxminddb.changes   
2018-06-29 22:23:17.482623894 +0200
@@ -1,0 +2,19 @@
+Sun May 27 08:30:23 UTC 2018 - sebix+novell@sebix.at
+
+- update to version 1.4.0:
+ * IMPORTANT: Previously, the pure Python reader would allow
+   `ipaddress.IPv4Address` and `ipaddress.IPv6Address` objects when calling
+   `.get()`. This would fail with the C extension. The fact that these objects
+   worked at all was an implementation detail and has varied with different
+   releases. This release makes the pure Python implementation consistent
+   with the extension. A `TypeError` will now be thrown if you attempt to
+   use these types with either the pure Python implementation or the
+   extension. The IP address passed to `.get()` should be a string type.
+ * Fix issue where incorrect size was used when unpacking some types with the
+   pure Python reader. Reported by Lee Symes. GitHub #30.
+ * You may now pass in the database via a file descriptor rather than a file
+   name when creating a new ``maxminddb.Reader`` object using ``MODE_FD``.
+   This will read the database from the file descriptor into memory. Pull
+   request by nkinkade. GitHub #33.
+
+---

Old:

  maxminddb-1.3.0.tar.gz

New:

  maxminddb-1.4.0.tar.gz



Other differences:
--
++ python-maxminddb.spec ++
--- /var/tmp/diff_new_pack.vpVM7t/_old  2018-06-29 22:23:18.054623465 +0200
+++ /var/tmp/diff_new_pack.vpVM7t/_new  2018-06-29 22:23:18.058623462 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-maxminddb
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# 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
@@ -13,28 +13,27 @@
 # published by the Open Source Initiative.
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without test
 Name:   python-maxminddb
-Version:1.3.0
+Version:1.4.0
 Release:0
-License:Apache-2.0
 Summary:Reader for the MaxMind DB format
-Url:http://www.maxmind.com/
+License:Apache-2.0
 Group:  Development/Languages/Python
+Url:http://www.maxmind.com/
 Source: 
https://files.pythonhosted.org/packages/source/m/maxminddb/maxminddb-%{version}.tar.gz
-BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
-BuildRequires:  python2-ipaddress
-BuildRequires:  libmaxminddb-devel
 BuildRequires:  fdupes
+BuildRequires:  libmaxminddb-devel
+BuildRequires:  python-rpm-macros
+BuildRequires:  python2-ipaddress
 # SECTION test requirements
-%if %{with test}
+BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module nose}
-%endif
 # /SECTION
 %ifpython2
 Requires:   python2-ipaddress
@@ -63,14 +62,12 @@
 %python_expand rm %buildroot%{$python_sitearch}/maxminddb/extension/maxminddb.c
 %python_expand %fdupes %buildroot%{$python_sitearch}
 
-%if %{with test}
 %check
 %python_exec setup.py test
-%endif
 
 %files %{python_files}
-%defattr(-,root,root,-)
-%doc LICENSE README.rst
+%license LICENSE
+%doc README.rst
 %{python_sitearch}/*
 
 %changelog

++ maxminddb-1.3.0.tar.gz -> maxminddb-1.4.0.tar.gz ++
 47908 lines of diff (skipped)




commit python-maxminddb for openSUSE:Factory

2017-06-20 Thread root
Hello community,

here is the log from the commit of package python-maxminddb for 
openSUSE:Factory checked in at 2017-06-20 09:39:02

Comparing /work/SRC/openSUSE:Factory/python-maxminddb (Old)
 and  /work/SRC/openSUSE:Factory/.python-maxminddb.new (New)


Package is "python-maxminddb"

Tue Jun 20 09:39:02 2017 rev:1 rq:501315 version:1.3.0

Changes:

New Changes file:

--- /dev/null   2017-03-01 00:40:19.279048016 +0100
+++ /work/SRC/openSUSE:Factory/.python-maxminddb.new/python-maxminddb.changes   
2017-06-20 09:39:10.614375581 +0200
@@ -0,0 +1,4 @@
+---
+Thu May 25 15:52:15 UTC 2017 - sebix+novell@sebix.at
+
+- initial package

New:

  maxminddb-1.3.0.tar.gz
  python-maxminddb.changes
  python-maxminddb.spec



Other differences:
--
++ python-maxminddb.spec ++
#
# spec file for package python-maxminddb
#
# 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-%{**}}
%bcond_without test
Name:   python-maxminddb
Version:1.3.0
Release:0
License:Apache-2.0
Summary:Reader for the MaxMind DB format
Url:http://www.maxmind.com/
Group:  Development/Languages/Python
Source: 
https://files.pythonhosted.org/packages/source/m/maxminddb/maxminddb-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  python2-ipaddress
BuildRequires:  libmaxminddb-devel
BuildRequires:  fdupes
# SECTION test requirements
%if %{with test}
BuildRequires:  %{python_module nose}
%endif
# /SECTION
%ifpython2
Requires:   python2-ipaddress
Recommends: libmaxminddb0
%endif
BuildRoot:  %{_tmppath}/%{name}-%{version}-build

%python_subpackages

%description
This is a Python module for reading MaxMind DB files. The module includes both
a pure Python reader and an optional C extension.

MaxMind DB is a binary file format that stores data indexed by IP address
subnets (IPv4 or IPv6).

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

%build
export CFLAGS="%{optflags}"
%python_build

%install
%python_install
%python_expand rm %buildroot%{$python_sitearch}/maxminddb/extension/maxminddb.c
%python_expand %fdupes %buildroot%{$python_sitearch}

%if %{with test}
%check
%python_exec setup.py test
%endif

%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE README.rst
%{python_sitearch}/*

%changelog