Hello community,

here is the log from the commit of package python-scipy for openSUSE:Factory 
checked in at 2019-01-24 14:12:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-scipy (Old)
 and      /work/SRC/openSUSE:Factory/.python-scipy.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-scipy"

Thu Jan 24 14:12:42 2019 rev:31 rq:667673 version:1.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-scipy/python-scipy.changes        
2019-01-08 12:28:18.500283323 +0100
+++ /work/SRC/openSUSE:Factory/.python-scipy.new.28833/python-scipy.changes     
2019-01-24 14:12:42.991410839 +0100
@@ -1,0 +2,30 @@
+Mon Jan 21 19:11:15 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Trim filler wording from description.
+
+-------------------------------------------------------------------
+Fri Jan 18 11:33:14 UTC 2019 - [email protected]
+
+- Some futher changes:
+  * Remove the use of fftw. The code doesn't link against it
+    anywhere. For HPC we would have to build things separately
+    for different MPI flavors as fftw3 exists only with HPC
+    support there.
+  * restructure the build process: since the environment for
+    the right python version of Numpy needs to be loaded, wrap
+    entire build (and install) in %%{python_expand: ..}.
+
+-------------------------------------------------------------------
+Thu Jan 17 23:58:18 UTC 2019 - [email protected]
+
+- Add support for HPC builds:
+  * Add _multibuild file
+  * Add standard and gnu-hpc builds
+  * Create initialization for both flavors to set the correct
+    target directories in macros and replace install paths
+    with these.
+  * Restructure the build process.
+  * Create 'master' packages for non-HPC builds.
+  * Create environment module information,
+
+-------------------------------------------------------------------

New:
----
  _multibuild

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

Other differences:
------------------
++++++ python-scipy.spec ++++++
--- /var/tmp/diff_new_pack.u5c4Sb/_old  2019-01-24 14:12:43.851409847 +0100
+++ /var/tmp/diff_new_pack.u5c4Sb/_new  2019-01-24 14:12:43.855409841 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-scipy
 #
-# 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
@@ -16,10 +16,24 @@
 #
 
 
+%global flavor @BUILD_FLAVOR@%{nil}
+
+%define ver 1.2.0
+%define _ver 1_2_0
+%define pname python-scipy
+
+%bcond_with ringdisabled
+
+%define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_')
+
+%if "%flavor" == ""
+ExclusiveArch:  do_not_build
+%endif
+
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%if 0%{?is_opensuse} == 0
-  %bcond_with openblas
-%else
+
+%if "%flavor" == "standard"
+ %bcond_with hpc
   %ifarch armv6l s390 s390x m68k riscv64
     %bcond_with openblas
   %else
@@ -34,13 +48,48 @@
     %endif
   %endif
 %endif
+
+%if "%flavor" == "gnu-hpc"
+ %bcond_without hpc
+ %define compiler_family gnu
+ %undefine c_f_ver
+%endif
+
+%if "%flavor" == "gnu7-hpc"
+ %bcond_without hpc
+ %define compiler_family gnu
+ %define c_f_ver 7
+%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
+ %ifarch armv6l s390 s390x m68k riscv64 i586
+ExclusiveArch:  do_not_build   
+ %endif
+%{!?compiler_family:%global compiler_family gnu}
+%{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?ext:-e %{ext}}}
+%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
+
 %if 0%{?is_opensuse} == 0
   %bcond_with suitesparse
 %else
   %bcond_without suitesparse
 %endif
-Name:           python-scipy
-Version:        1.2.0
+Name:           %{package_name}
+Version:        %ver
 Release:        0
 Summary:        Scientific Tools for Python
 License:        BSD-3-Clause AND LGPL-2.0-or-later
@@ -52,36 +101,45 @@
 Patch0:         no_implicit_decl.patch
 BuildRequires:  %{python_module Cython >= 0.19}
 BuildRequires:  %{python_module devel}
-BuildRequires:  %{python_module numpy-devel >= 1.5.1}
 BuildRequires:  %{python_module setuptools}
-BuildRequires:  blas-devel
 BuildRequires:  fdupes
-BuildRequires:  fftw-devel
-BuildRequires:  gcc-c++
-BuildRequires:  gcc-fortran
-BuildRequires:  lapack-devel
-BuildRequires:  lapacke-devel
 BuildRequires:  python-rpm-macros
-BuildRequires:  swig
-Requires:       python-numpy >= 1.5.1
 %if %{with suitesparse}
 BuildRequires:  suitesparse-devel-static
 %endif
-%if %{with openblas}
+BuildRequires:  swig
+%if %{without hpc}
+BuildRequires:  gcc-c++
+BuildRequires:  gcc-fortran
+ %if %{with openblas}
 BuildRequires:  openblas-devel
+ %else
+BuildRequires:  blas-devel
+BuildRequires:  lapack-devel
+ %endif
+BuildRequires:  %{python_module numpy-devel >= 1.5.1}
+BuildRequires:  lapacke-devel
+Requires:       python-numpy >= 1.5.1
+%else
+BuildRequires:  %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
+BuildRequires:  %{python_module 
numpy%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel}
+BuildRequires:  libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
+BuildRequires:  lua-lmod
+BuildRequires:  suse-hpc
+Requires:       %{python_module 
numpy%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc}
+Requires:       libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc
 %endif
+%{?with_hpc:%{hpc_requires}}
 %python_subpackages
 
 %description
 Scipy is open-source software for mathematics, science, and
 engineering. The core library is NumPy which provides convenient and
 fast N-dimensional array manipulation. The SciPy library is built to
-work with NumPy arrays, and provides many user-friendly and efficient
-numerical routines such as routines for numerical integration and
-optimization. Together, they run on all popular operating systems, are
-quick to install, and are free of charge. NumPy and SciPy are easy to
-use, but powerful enough to be depended upon by some of the world's
-leading scientists and engineers.
+work with NumPy arrays, and provides many numerical routines such as
+for numerical integration and optimization.
+
+%{?with_hpc:%{hpc_python_master_package -L -a }}
 
 %prep
 %setup -q -n scipy-%{version}
@@ -101,22 +159,90 @@
 EOF
 
 %build
+%{python_expand #
+%if %{with hpc}
+py_ver=%{$python_version}
+%hpc_setup
+module load openblas
+module load python${py_ver/.*/}-numpy
+export CFLAGS="$(pkg-config --cflags openblas) %{optflags} 
-fno-strict-aliasing" LIBS="$(pkg-config --libs openblas)"
+export OPENBLAS=$OPENBLAS_LIB
+cat > site.cfg <<EOF
+[openblas]
+libraries = openblas
+library_dirs = $OPENBLAS_LIB
+include_dirs = $OPENBLAS_INC
+EOF
+%else
 export CFLAGS="%{optflags} -fno-strict-aliasing"
-export FFTW=%{_libdir}
 export BLAS=%{_libdir}
 export LAPACK=%{_libdir}
-%if %{with openblas}
+ %if %{with openblas}
 export OPENBLAS=%{_libdir}
+ %endif
 %endif
-%python_exec setup.py config_fc --fcompiler=gnu95 --noarch build
+%__$python setup.py config_fc --fcompiler=gnu95 --noarch build
+}
 
 %install
-%python_install
-%python_expand %fdupes %{buildroot}%{$python_sitearch}
+%{python_expand #
+%if %{with hpc}
+py_ver=%{$python_version}
+%hpc_setup
+module load openblas
+module load python${py_ver/.*/}-numpy
+%endif
+%__$python setup.py install --prefix=%{p_prefix} --root=%{buildroot}
+%fdupes %{buildroot}%{$python_sitearch}
+
+%if %{with hpc}
+%define hpc_module_pname python${py_ver/.*/}-scipy
+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}/scipy/{,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} toolchain."
+module-whatis "Version: %{version}"
+module-whatis "Category: python module"
+module-whatis "Description: %{summary}"
+module-whatis "URL %{url}"
+
+set     version             %{version}
+
+depends-on python${py_ver/.*/}-numpy
+
+prepend-path    PATH                %{hpc_bindir}
+prepend-path    PYTHONPATH          ${sitesearch_path}
+
+setenv          %{hpc_upcase_trans_hyph %pname}_DIR        %{hpc_prefix}
+setenv          %{hpc_upcase_trans_hyph %pname}_BIN        %{hpc_bindir}
+
+family "SciPy"
+EOF
+%endif
+}
 
 %files %{python_files}
 %license LICENSE.txt
-%{python_sitearch}/scipy/
-%{python_sitearch}/scipy-*-py*.egg-info
+%{p_python_sitearch}/scipy/
+%{p_python_sitearch}/scipy-*-py*.egg-info
+
+%if %{with hpc}
+%define hpc_module_pname python%(a=%{hpc_python_version}; echo -n 
${a/.*/})-scipy
+%{hpc_modules_files}
+%{hpc_dirs}
+%dir %{hpc_libdir}/python%{hpc_python_version}
+%dir %{p_python_sitearch}
+%endif
 
 %changelog

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

Reply via email to