diff --git a/python-annoy.changes b/python-annoy.changes index ced2e9d..c4709e3 100644 --- a/python-annoy.changes +++ b/python-annoy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 10 05:06:28 UTC 2018 - bwiedemann@suse.com + +- Add reproducible.patch to not depend on build system CPU (boo#1100677) + ------------------------------------------------------------------- Wed May 9 18:42:30 UTC 2018 - toddrme2178@gmail.com diff --git a/python-annoy.spec b/python-annoy.spec index 6a6fa4f..bc49b22 100644 --- a/python-annoy.spec +++ b/python-annoy.spec @@ -25,6 +25,8 @@ Summary: Approximate Nearest Neighbors Url: https://github.com/spotify/annoy Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/a/annoy/annoy-%{version}.tar.gz +# PATCH-FIX-OPENSUSE boo#1100677 +Patch0: reproducible.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module nose >= 1.0} BuildRequires: %{python_module setuptools} @@ -43,6 +45,7 @@ share the same data. %prep %setup -q -n annoy-%{version} +%patch0 -p1 %build export CFLAGS="%{optflags}" diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..51a315b --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,26 @@ +Author: Bernhard M. Wiedemann +Date: 2018-07-10 + +https://bugzilla.opensuse.org/show_bug.cgi?id=1100677 + +Index: annoy-1.12.0/setup.py +=================================================================== +--- annoy-1.12.0.orig/setup.py ++++ annoy-1.12.0/setup.py +@@ -42,15 +42,12 @@ else: + + # 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 = [] ++cputune = [] + + setup(name='annoy', + version='1.12.0',