Hello community,

here is the log from the commit of package python-numpy for openSUSE:Factory 
checked in at 2017-10-20 14:38:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-numpy (Old)
 and      /work/SRC/openSUSE:Factory/.python-numpy.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-numpy"

Fri Oct 20 14:38:55 2017 rev:58 rq:535006 version:1.13.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-numpy/python-numpy.changes        
2017-10-07 17:47:18.196172195 +0200
+++ /work/SRC/openSUSE:Factory/.python-numpy.new/python-numpy.changes   
2017-10-20 14:39:01.191471476 +0200
@@ -1,0 +2,12 @@
+Tue Oct 17 14:27:47 UTC 2017 - [email protected]
+
+- Add magic to limit the number of flavors built in the OBS ring
+  to non-HPC builds.
+
+-------------------------------------------------------------------
+Tue Oct 3 18:44:35 UTC 2017 - [email protected]
+
+- Convert to multibuild: Add support for HPC environment modules
+  (FATE#321709).
+
+-------------------------------------------------------------------

Old:
----
  python-numpy-doc.changes
  python-numpy-doc.spec

New:
----
  _multibuild

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-numpy.spec ++++++
--- /var/tmp/diff_new_pack.yOfIyF/_old  2017-10-20 14:39:02.207423934 +0200
+++ /var/tmp/diff_new_pack.yOfIyF/_new  2017-10-20 14:39:02.211423748 +0200
@@ -16,31 +16,58 @@
 #
 
 
-%if 0%{?is_opensuse} == 0
-%bcond_with openblas
-%else
-%ifarch armv6l
-%bcond_with openblas
-%ifarch s390x
-%bcond_with openblas
-%else
-%else
-%if 0%{?sle_version} == 120200
-%ifarch i586
-%bcond_with openblas
-%else
-%bcond_without openblas
+%global flavor @BUILD_FLAVOR@%{nil}
+
+%define ver 1.13.3
+%define _ver 1_13_3
+%define pname python-numpy
+
+%bcond_with ringdisabled
+
+%if "%flavor" == ""
+ExclusiveArch:  do_not_build
 %endif
-%else
-%bcond_without openblas
+
+%if "%flavor" == "standard"
+ %bcond_with hpc
+ %ifarch armv6l s390x
+  %bcond_with openblas
+ %else
+  %bcond_without openblas
+ %endif
+%endif
+
+%if "%flavor" == "gnu-hpc"
+ %bcond_without hpc
 %endif
+
+%if "%flavor" == "gnu6-hpc"
+ %bcond_without hpc
+ %define c_f_ver 6
 %endif
+
+%if %{without hpc}
+%define package_name %{pname}
+%define p_python_sitearch %python_sitearch
+%define p_prefix %_prefix
+%define p_bindir %_bindir
+%else
+# Magic for OBS Staging. Only build the flavors required by
+# other packages in the ring.
+%if %{with ringdisabled}
+ExclusiveArch:  do_not_build
 %endif
+%{!?compiler_family:%global compiler_family gnu}
+%{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?mpi_ver:-V 
%{mpi_ver}}}
+%define package_name %{hpc_package_name %_ver}
+%define p_python_sitearch %hpc_python_sitearch
+%define p_prefix %hpc_prefix
+%define p_bindir %hpc_bindir
 %endif
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-Name:           python-numpy
-Version:        1.13.3
+Name:           %{package_name}
+Version:        %ver
 Release:        0
 Summary:        NumPy array processing for numbers, strings, records and 
objects
 License:        BSD-3-Clause
@@ -51,24 +78,33 @@
 Patch0:         numpy-buildfix.patch
 # PATCH-FIX-OPENSUSE numpy-1.9.0-remove-__declspec.patch -- fix for spurious 
compiler warnings that cause build failure
 Patch1:         numpy-1.9.0-remove-__declspec.patch
-BuildRequires:  blas-devel
 %if 0%{?suse_version}
 BuildRequires:  fdupes
 %endif
-%if 0%{?suse_version}
+%if %{without hpc}
+ %if 0%{?suse_version}
 BuildRequires:  gcc-fortran
-%else
+ %else
 BuildRequires:  gcc-gfortran
+ %endif
+ %if %{with openblas}
+BuildRequires:  openblas-devel
+ %else
+BuildRequires:  blas-devel
+BuildRequires:  lapack-devel
+ %endif
+%else
+BuildRequires:  %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
+BuildRequires:  libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
+BuildRequires:  lua-lmod
+BuildRequires:  suse-hpc
 %endif
 BuildRequires:  %{python_module Cython}
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
-BuildRequires:  lapack-devel
 BuildRequires:  python-rpm-macros
 BuildRequires:  unzip
-%if %{with openblas}
-BuildRequires:  openblas-devel
-%endif
+%{?with_hpc:%{hpc_requires}}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %python_subpackages
@@ -85,65 +121,139 @@
 There are also basic facilities for discrete fourier transform,
 basic linear algebra and random number generation.
 
+%{?with_hpc:%{hpc_python_master_package -L -a }}
 
 %package devel
 Summary:        Development files for numpy applications
 Group:          Development/Libraries/Python
 Requires:       %{name} = %{version}
-Requires:       blas-devel
-%if 0%{?suse_version}
-BuildRequires:  gcc-fortran
-%else
-BuildRequires:  gcc-gfortran
-%endif
-Requires:       lapack-devel
 Requires:       python-devel
-%if %{with openblas}
+%if %{without hpc}
+ %if %{with openblas}
 Requires:       openblas-devel
+ %else
+Requires:       blas-devel
+Requires:       lapack-devel
+ %endif
+%else
+Requires:       openblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
+%hpc_requires_devel
 %endif
 
 %description devel
 This package contains files for developing applications using numpy.
 
+%{?with_hpc:%{hpc_python_master_package devel -a }}
 
 %prep
 %setup -q -n numpy-%{version}
 %patch0 -p1
 %patch1 -p1
 # Fix non-executable scripts
-sed -i "1d" 
numpy/{compat/setup,distutils/{conv_template,cpuinfo,from_template,setup,system_info},f2py/{__init__,auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,f2py2e,f90mod_rules,func2subr,rules,setup,use_rules},ma/setup,matrixlib/setup,setup,testing/{print_coercion_tables,setup}}.py
+sed -i '1s/^#!.*$//' 
numpy/{compat/setup,distutils/{conv_template,cpuinfo,exec_command,from_template,setup,system_info},f2py/{__init__,auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,f2py2e,f90mod_rules,func2subr,rules,setup,use_rules},ma/setup,matrixlib/setup,setup,testing/{print_coercion_tables,setup}}.py
 
 %build
+%if %{with hpc}
+%hpc_setup
+module load openblas
+export CFLAGS="$(pkg-config --cflags openblas) %{optflags} 
-fno-strict-aliasing" LIBS="$(pkg-config --libs openblas)"
+cat > site.cfg <<EOF
+[openblas]
+libraries = openblas
+library_dirs = $OPENBLAS_LIB
+include_dirs = $OPENBLAS_INC
+EOF
+%else
 export CFLAGS="%{optflags} -fno-strict-aliasing"
+%endif
+
 %python_build
 
 %install
-%python_exec setup.py install --prefix=%{_prefix} --root=%{buildroot}
-%python_expand rm -rf 
%{buildroot}%{$python_sitearch}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests
 # Don't package testsuite
+%{?with_hpc:%{hpc_setup}}
+%{?with_hpc:module load openblas}
+
+%python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot}
+
 %if 0%{?suse_version}
-%fdupes %{buildroot}%{prefix}
+%fdupes %{buildroot}%{p_prefix}
+%endif
+
+%if %{without hpc}
+
+%python_expand rm -rf 
%{buildroot}%{$python_sitearch}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests
 # Don't package testsuite
+
+%else
+
+%define hpc_module_pname python${py_ver/.*/}-numpy
+%{python_expand # Don't package testsuite
+py_ver=%{$python_version}
+sitesearch_path=`$python -c "import sysconfig as s; 
print(s.get_paths(vars={'platbase':'%{hpc_prefix}','base':'%{hpc_prefix}'}).get('platlib'))"`
+rm -rf 
%{buildroot}${sitesearch_path}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests
+%hpc_write_modules_files
+#%%Module1.0#####################################################################
+
+proc ModulesHelp { } {
+
+puts stderr " "
+puts stderr "This module loads the %{pname} library built with the 
%{compiler_family} compiler"
+puts stderr "toolchain."
+puts stderr "\nVersion %{version}\n"
+
+}
+module-whatis "Name: %{pname} built with %{compiler_family} compiler"
+module-whatis "Version: %{version}"
+module-whatis "Category: python module"
+module-whatis "Description: %{summary}"
+module-whatis "URL %{url}"
+
+set     version             %{version}
+
+if [ expr [ module-info mode load ] || [module-info mode display ] ] {
+  if { ![is-loaded intel] && ![is-loaded openblas] } {
+      module load openblas
+    }
+}
+
+prepend-path    PATH                %{hpc_bindir}
+prepend-path    PYTHONPATH          ${sitesearch_path}
+
+setenv          %{hpc_upcase %pname}_DIR        %{hpc_prefix}
+setenv          %{hpc_upcase %pname}_BIN        %{hpc_bindir}
+
+EOF
+}
 %endif
 
 %files %{python_files}
 %defattr(-,root,root)
 %doc *.txt
-%python2_only %{_bindir}/f2py2
-%python3_only %{_bindir}/f2py3
-%{python_sitearch}/numpy/
-%{python_sitearch}/numpy-%{version}-py*.egg-info
-%exclude %{python_sitearch}/numpy/*/*/*.c
-%exclude %{python_sitearch}/numpy/*/*.h
-%exclude %{python_sitearch}/numpy/*/*/*.h
-%exclude %{python_sitearch}/numpy/*/*/*/*.h
-%exclude %{python_sitearch}/numpy/core/lib/libnpymath.a
+%python2_only %{p_bindir}/f2py2
+%python3_only %{p_bindir}/f2py3
+%{p_python_sitearch}/numpy/
+%{p_python_sitearch}/numpy-%{version}-py*.egg-info
+%exclude %{p_python_sitearch}/numpy/*/*/*.c
+%exclude %{p_python_sitearch}/numpy/*/*.h
+%exclude %{p_python_sitearch}/numpy/*/*/*.h
+%exclude %{p_python_sitearch}/numpy/*/*/*/*.h
+%exclude %{p_python_sitearch}/numpy/core/lib/libnpymath.a
+
+%if %{with hpc}
+%define hpc_module_pname python%(a=%{hpc_python_version}; echo -n 
${a/.*/})-numpy
+%{hpc_modules_files}
+%{hpc_dirs}
+%dir %hpc_bindir
+%dir %{hpc_libdir}/python%{hpc_python_version}
+%dir %{p_python_sitearch}
+%endif
 
 %files %{python_files devel}
 %defattr(-,root,root)
 %doc LICENSE.txt
-%{python_sitearch}/numpy/*/*/*.c
-%{python_sitearch}/numpy/*/*.h
-%{python_sitearch}/numpy/*/*/*.h
-%{python_sitearch}/numpy/*/*/*/*.h
-%{python_sitearch}/numpy/core/lib/libnpymath.a
+%{p_python_sitearch}/numpy/*/*/*.c
+%{p_python_sitearch}/numpy/*/*.h
+%{p_python_sitearch}/numpy/*/*/*.h
+%{p_python_sitearch}/numpy/*/*/*/*.h
+%{p_python_sitearch}/numpy/core/lib/libnpymath.a
 
 %changelog

++++++ _multibuild ++++++
<multibuild>
  <package>standard</package>
  <package>gnu-hpc</package>
</multibuild>


Reply via email to