From 2446b13214a72362a9b3474a24a83dae120b81bd71df32e9092517d0339fc2e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 6 Mar 2019 12:14:00 +0000 Subject: [PATCH] - Update to 1.15.1: * Various minor fixes * Fixes to the Euclidean distance function (avoid catastrophic cancellation) * Don't MAP_POPULATE by default * dot products are now supported - Update patch reproducible.patch: * expand to not screw with cflags either OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-annoy?expand=0&rev=5 --- annoy-1.12.0.tar.gz | 3 --- annoy-1.15.1.tar.gz | 3 +++ python-annoy.changes | 11 +++++++++++ python-annoy.spec | 21 +++++++-------------- reproducible.patch | 43 +++++++++++++++++++++++++++---------------- 5 files changed, 48 insertions(+), 33 deletions(-) delete mode 100644 annoy-1.12.0.tar.gz create mode 100644 annoy-1.15.1.tar.gz diff --git a/annoy-1.12.0.tar.gz b/annoy-1.12.0.tar.gz deleted file mode 100644 index 7fbee32..0000000 --- a/annoy-1.12.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8f2aa56f7971dc1e9e10ee5a846aabe83a13e692e0107e317c101a5674a4ec70 -size 632542 diff --git a/annoy-1.15.1.tar.gz b/annoy-1.15.1.tar.gz new file mode 100644 index 0000000..a52799e --- /dev/null +++ b/annoy-1.15.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37ff7cbe21f76fd48479a866e94cff3d288520940d16f20ec8626460ad36b6e7 +size 643171 diff --git a/python-annoy.changes b/python-annoy.changes index c4709e3..4cd3b30 100644 --- a/python-annoy.changes +++ b/python-annoy.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Mar 6 12:09:25 UTC 2019 - Tomáš Chvátal + +- Update to 1.15.1: + * Various minor fixes + * Fixes to the Euclidean distance function (avoid catastrophic cancellation) + * Don't MAP_POPULATE by default + * dot products are now supported +- Update patch reproducible.patch: + * expand to not screw with cflags either + ------------------------------------------------------------------- Tue Jul 10 05:06:28 UTC 2018 - bwiedemann@suse.com diff --git a/python-annoy.spec b/python-annoy.spec index bc49b22..39e7fbb 100644 --- a/python-annoy.spec +++ b/python-annoy.spec @@ -1,7 +1,7 @@ # # spec file for package python-annoy # -# 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,18 +12,18 @@ # 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-%{**}} -%bcond_with test Name: python-annoy -Version: 1.12.0 +Version: 1.15.1 Release: 0 -License: Apache-2.0 Summary: Approximate Nearest Neighbors -Url: https://github.com/spotify/annoy +License: Apache-2.0 Group: Development/Languages/Python +URL: https://github.com/spotify/annoy Source: https://files.pythonhosted.org/packages/source/a/annoy/annoy-%{version}.tar.gz # PATCH-FIX-OPENSUSE boo#1100677 Patch0: reproducible.patch @@ -33,7 +33,6 @@ BuildRequires: %{python_module setuptools} BuildRequires: c++_compiler BuildRequires: fdupes BuildRequires: python-rpm-macros - %python_subpackages %description @@ -48,20 +47,14 @@ share the same data. %patch0 -p1 %build -export CFLAGS="%{optflags}" +export CFLAGS="%{optflags} -fno-strict-aliasing" %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitearch} -%if %{with test} -%check -%python_exec setup.py test -%endif - %files %{python_files} -%defattr(-,root,root,-) %doc README.rst %license LICENSE %{python_sitearch}/* diff --git a/reproducible.patch b/reproducible.patch index 51a315b..a042e4f 100644 --- a/reproducible.patch +++ b/reproducible.patch @@ -3,24 +3,35 @@ Date: 2018-07-10 https://bugzilla.opensuse.org/show_bug.cgi?id=1100677 -Index: annoy-1.12.0/setup.py +Index: annoy-1.15.1/setup.py =================================================================== ---- annoy-1.12.0.orig/setup.py -+++ annoy-1.12.0/setup.py -@@ -42,15 +42,12 @@ else: +--- annoy-1.15.1.orig/setup.py ++++ annoy-1.15.1/setup.py +@@ -36,26 +36,10 @@ with codecs.open('README.rst', encoding= + long_description = readme_note + fobj.read() - # Not all CPUs have march as a tuning parameter - import platform --cputune = ['-march=native',] --if platform.machine() == "ppc64le": -- cputune = ['-mcpu=native',] - - if os.name != 'nt': - compile_args = ['-O3', '-ffast-math', '-fno-associative-math'] - else: - compile_args = [] -- cputune = [] + # Various platform-dependent extras +cputune = [] + extra_compile_args = [] + extra_link_args = [] +-if os.environ.get('TRAVIS') == 'true': +- # Resolving some annoying issue +- extra_compile_args += ['-mno-avx'] +- +-# Not all CPUs have march as a tuning parameter +-cputune = ['-march=native',] +-if platform.machine() == 'ppc64le': +- extra_compile_args += ['-mcpu=native',] +- +-if os.name != 'nt': +- extra_compile_args += ['-O3', '-ffast-math', '-fno-associative-math'] +- +-# #349: something with OS X Mojave causes libstd not to be found +-if platform.system() == 'Darwin': +- extra_compile_args += ['-std=c++11', '-mmacosx-version-min=10.9'] +- extra_link_args += ['-stdlib=libc++', '-mmacosx-version-min=10.9'] +- setup(name='annoy', - version='1.12.0', + version='1.15.1', + description='Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk.',