From 336775b647f7c1b8fbe5825e140faa5a3c74458d Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 3 Feb 2021 01:08:56 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/numpy.git#7706b2b2c1d99b0e98c12ec440c25b0324169bca --- .gitignore | 1 + 18100.patch | 179 ---------------------------------------------------- numpy.spec | 15 +++-- sources | 2 +- 4 files changed, 11 insertions(+), 186 deletions(-) delete mode 100644 18100.patch diff --git a/.gitignore b/.gitignore index dcf7523..89694f4 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,4 @@ numpy-1.4.1.tar.gz /numpy-1.19.3.tar.gz /numpy-1.19.4.tar.gz /numpy-1.20.0rc2.tar.gz +/numpy-1.20.0.tar.gz diff --git a/18100.patch b/18100.patch deleted file mode 100644 index 8af9ca2..0000000 --- a/18100.patch +++ /dev/null @@ -1,179 +0,0 @@ -From caec7f21ce3ca2672e93781a379734295c00debe Mon Sep 17 00:00:00 2001 -From: Sayed Adel -Date: Wed, 30 Dec 2020 10:15:55 +0000 -Subject: [PATCH] BUG, BLD: Generate the main dispatcher config header into the - build dir - - The new path becomes `build/src.*/numpy/distutils/include/npy_cpu_dispatch_config.h` - instead of `numpy/core/src/common/_cpu_dispatch.h`. - - The new path allows other projects to re-use the CPU dispatcher - once we decide to expose the following headers: - - `numpy/core/src/common/npy_cpu_dispatch.h` - - `numpy/core/src/common/npy_cpu_features.h` ---- - numpy/core/src/common/npy_cpu_dispatch.h | 4 +-- - numpy/distutils/ccompiler_opt.py | 32 +++++++++++++----------- - numpy/distutils/command/build_clib.py | 18 +++++++++---- - numpy/distutils/command/build_ext.py | 22 +++++++++++----- - 5 files changed, 48 insertions(+), 31 deletions(-) - -diff --git a/numpy/core/src/common/npy_cpu_dispatch.h b/numpy/core/src/common/npy_cpu_dispatch.h -index a0f82fa3da0..f69fd2b2ee8 100644 ---- a/numpy/core/src/common/npy_cpu_dispatch.h -+++ b/numpy/core/src/common/npy_cpu_dispatch.h -@@ -7,7 +7,7 @@ - #include "npy_cpu_features.h" // NPY_CPU_HAVE - #include "numpy/utils.h" // NPY_EXPAND, NPY_CAT - /** -- * Bringing the main configration header '_cpu_dispatch.h'. -+ * Bringing the main configration header 'npy_cpu_dispatch_config.h'. - * - * This header is generated by the distutils module 'ccompiler_opt', - * and contains all the #definitions and headers of instruction-sets, -@@ -33,7 +33,7 @@ - #define NPY__DISPATCH_DEFBOOL - typedef bool npy__dispatch_bkbool; - #endif -- #include "_cpu_dispatch.h" -+ #include "npy_cpu_dispatch_config.h" - #ifdef NPY_HAVE_VSX - #undef bool - #undef vector -diff --git a/numpy/distutils/ccompiler_opt.py b/numpy/distutils/ccompiler_opt.py -index ecf5172ccca..39c08d36b2a 100644 ---- a/numpy/distutils/ccompiler_opt.py -+++ b/numpy/distutils/ccompiler_opt.py -@@ -2240,6 +2240,14 @@ def generate_dispatch_header(self, header_path): - baseline_len = len(baseline_names) - dispatch_len = len(dispatch_names) - -+ header_dir = os.path.dirname(header_path) -+ if not os.path.exists(header_dir): -+ self.dist_log( -+ f"dispatch header dir {header_dir} isn't exist, creating it", -+ stderr=True -+ ) -+ os.makedirs(header_dir) -+ - with open(header_path, 'w') as f: - baseline_calls = ' \\\n'.join([ - ( -@@ -2504,30 +2512,24 @@ def _generate_config(self, output_dir, dispatch_src, targets, has_baseline=False - )) - return False - --def new_ccompiler_opt(compiler, **kwargs): -+def new_ccompiler_opt(compiler, dispatch_hpath, **kwargs): - """ - Create a new instance of 'CCompilerOpt' and generate the dispatch header -- inside NumPy source dir. -+ which containing all definitions and headers of instruction-sets for -+ the enabled CPU baseline and dispatch-able features. - - Parameters - ---------- -- 'compiler' : CCompiler instance -- '**kwargs': passed as-is to `CCompilerOpt(...)` -+ compiler : CCompiler instance -+ dispatch_hpath : str -+ path of the dispatch header - -+ **kwargs: passed as-is to `CCompilerOpt(...)` - Returns - ------- - new instance of CCompilerOpt - """ - opt = CCompilerOpt(compiler, **kwargs) -- npy_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) -- header_dir = os.path.join(npy_path, *("core/src/common".split("/"))) -- header_path = os.path.join(header_dir, "_cpu_dispatch.h") -- if not os.path.exists(header_path) or not opt.is_cached(): -- if not os.path.exists(header_dir): -- opt.dist_log( -- "dispatch header dir '%s' isn't exist, creating it" % header_dir, -- stderr=True -- ) -- os.makedirs(header_dir) -- opt.generate_dispatch_header(header_path) -+ if not os.path.exists(dispatch_hpath) or not opt.is_cached(): -+ opt.generate_dispatch_header(dispatch_hpath) - return opt -diff --git a/numpy/distutils/command/build_clib.py b/numpy/distutils/command/build_clib.py -index a0db6f31f7e..1b3004c2f09 100644 ---- a/numpy/distutils/command/build_clib.py -+++ b/numpy/distutils/command/build_clib.py -@@ -118,12 +118,15 @@ def run(self): - self.compiler.show_customization() - - if not self.disable_optimization: -+ dispatch_hpath = os.path.join("numpy", "distutils", "include", "npy_cpu_dispatch_config.h") -+ dispatch_hpath = os.path.join(self.get_finalized_command("build_src").build_src, dispatch_hpath) - opt_cache_path = os.path.abspath( -- os.path.join(self.build_temp, 'ccompiler_opt_cache_clib.py' -- )) -+ os.path.join(self.build_temp, 'ccompiler_opt_cache_clib.py') -+ ) - self.compiler_opt = new_ccompiler_opt( -- compiler=self.compiler, cpu_baseline=self.cpu_baseline, -- cpu_dispatch=self.cpu_dispatch, cache_path=opt_cache_path -+ compiler=self.compiler, dispatch_hpath=dispatch_hpath, -+ cpu_baseline=self.cpu_baseline, cpu_dispatch=self.cpu_dispatch, -+ cache_path=opt_cache_path - ) - if not self.compiler_opt.is_cached(): - log.info("Detected changes on compiler optimizations, force rebuilding") -@@ -271,7 +274,12 @@ def build_a_library(self, build_info, lib_name, libraries): - copt_baseline_flags = [] - copt_macros = [] - if not self.disable_optimization: -- copt_build_src = None if self.inplace else self.get_finalized_command("build_src").build_src -+ bsrc_dir = self.get_finalized_command("build_src").build_src -+ dispatch_hpath = os.path.join("numpy", "distutils", "include") -+ dispatch_hpath = os.path.join(bsrc_dir, dispatch_hpath) -+ include_dirs.append(dispatch_hpath) -+ -+ copt_build_src = None if self.inplace else bsrc_dir - copt_c_sources = [ - c_sources.pop(c_sources.index(src)) - for src in c_sources[:] if src.endswith(".dispatch.c") -diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py -index ca6f8bcd24d..448f7941cd9 100644 ---- a/numpy/distutils/command/build_ext.py -+++ b/numpy/distutils/command/build_ext.py -@@ -146,11 +146,16 @@ def run(self): - self.compiler.show_customization() - - if not self.disable_optimization: -- opt_cache_path = os.path.abspath(os.path.join(self.build_temp, 'ccompiler_opt_cache_ext.py')) -- self.compiler_opt = new_ccompiler_opt(compiler=self.compiler, -- cpu_baseline=self.cpu_baseline, -- cpu_dispatch=self.cpu_dispatch, -- cache_path=opt_cache_path) -+ dispatch_hpath = os.path.join("numpy", "distutils", "include", "npy_cpu_dispatch_config.h") -+ dispatch_hpath = os.path.join(self.get_finalized_command("build_src").build_src, dispatch_hpath) -+ opt_cache_path = os.path.abspath( -+ os.path.join(self.build_temp, 'ccompiler_opt_cache_ext.py') -+ ) -+ self.compiler_opt = new_ccompiler_opt( -+ compiler=self.compiler, dispatch_hpath=dispatch_hpath, -+ cpu_baseline=self.cpu_baseline, cpu_dispatch=self.cpu_dispatch, -+ cache_path=opt_cache_path -+ ) - if not self.compiler_opt.is_cached(): - log.info("Detected changes on compiler optimizations, force rebuilding") - self.force = True -@@ -416,7 +421,12 @@ def build_extension(self, ext): - copt_baseline_flags = [] - copt_macros = [] - if not self.disable_optimization: -- copt_build_src = None if self.inplace else self.get_finalized_command("build_src").build_src -+ bsrc_dir = self.get_finalized_command("build_src").build_src -+ dispatch_hpath = os.path.join("numpy", "distutils", "include") -+ dispatch_hpath = os.path.join(bsrc_dir, dispatch_hpath) -+ include_dirs.append(dispatch_hpath) -+ -+ copt_build_src = None if self.inplace else bsrc_dir - copt_c_sources = [ - c_sources.pop(c_sources.index(src)) - for src in c_sources[:] if src.endswith(".dispatch.c") diff --git a/numpy.spec b/numpy.spec index 6c5274c..d18bd4c 100644 --- a/numpy.spec +++ b/numpy.spec @@ -20,19 +20,16 @@ Name: numpy Version: 1.20.0 -Release: 0.1.rc2%{?dist} +Release: 1%{?dist} Epoch: 1 Summary: A fast multidimensional array facility for Python # Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python License: BSD and Python and ASL 2.0 URL: http://www.numpy.org/ -Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}rc2/%{name}-%{version}rc2.tar.gz +Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz Source1: https://numpy.org/doc/1.19/numpy-html.zip -# https://github.com/numpy/numpy/pull/18100 -Patch0: 18100.patch - %description NumPy is a general-purpose array-processing package designed to efficiently manipulate large multi-dimensional arrays of arbitrary @@ -105,7 +102,7 @@ This package provides the complete documentation for NumPy. %prep -%autosetup -n %{name}-%{version}rc2 -p1 +%autosetup -n %{name}-%{version} -p1 # Force re-cythonization (ifed for PKG-INFO presence in setup.py) rm PKG-INFO @@ -197,6 +194,12 @@ python3 runtests.py %changelog +* Mon Feb 01 2021 Gwyn Ciesla - 1:1.20.0-1 +- 1.20.0 final. + +* Tue Jan 26 2021 Fedora Release Engineering - 1:1.20.0-0.2.rc2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Jan 04 2021 Nikola Forró - 1:1.20.0-0.1.rc2 - Generate the main dispatcher config header into the build dir diff --git a/sources b/sources index b202a83..0dd18dc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (numpy-1.20.0rc2.tar.gz) = f723e1951de7dd4598355e09f64293781808c78e532794e90603c3198ba24291a84dc2bc4748a6dd79a0caa13db864e8f1920b31b28956481bb237dcae4614a5 +SHA512 (numpy-1.20.0.tar.gz) = 98d8a8dac30452001ca82351d91e9adcabda601a1d011ed6d994cfa286cea66c0f44ac195ca0a7d5399452debd425f8d70ab4091f1b4a61d77133676b2faa2d3 SHA512 (numpy-html.zip) = 4a421636523424a0703290b6a0ba53b85a9a9e8a6256363e2481f1c02ae278825c09f2f13d39e99f8aae21f57a4978723f3fc690693520f8c3b45a5b4c5a38ab