From 6fde3602933379a0c7c0dd45a869f3e1f545b4112ebe015e3b755f223f9bff16 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 11 Jul 2018 07:44:59 +0000 Subject: [PATCH] Accepting request 621920 from home:bmwiedemann:branches:devel:languages:python Add reproducible.patch to not depend on build system CPU (boo#1100677) nicer patch OBS-URL: https://build.opensuse.org/request/show/621920 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-annoy?expand=0&rev=3 --- python-annoy.changes | 5 +++++ python-annoy.spec | 3 +++ reproducible.patch | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 reproducible.patch 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',