Hello community,

here is the log from the commit of package petsc for openSUSE:Factory checked 
in at 2020-01-09 22:53:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/petsc (Old)
 and      /work/SRC/openSUSE:Factory/.petsc.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "petsc"

Thu Jan  9 22:53:46 2020 rev:22 rq:762495 version:3.12.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/petsc/petsc.changes      2019-12-12 
23:19:01.846208811 +0100
+++ /work/SRC/openSUSE:Factory/.petsc.new.6675/petsc.changes    2020-01-09 
22:54:21.818822459 +0100
@@ -1,0 +2,9 @@
+Wed Jan  8 15:40:51 UTC 2020 - Stefan BrĂ¼ns <stefan.bru...@rwth-aachen.de>
+
+- Force use of python3 on Tumbleweed. As the python2 executable was
+  also set in petsc's configuration, dependent packages no longer
+  depend on python2.
+- Fix she-bangs in python scripts
+- Only require python{2,3}-base packages instead of full packages.
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ petsc.spec ++++++
--- /var/tmp/diff_new_pack.CI17au/_old  2020-01-09 22:54:23.958823530 +0100
+++ /var/tmp/diff_new_pack.CI17au/_new  2020-01-09 22:54:23.998823550 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package petsc
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -31,6 +31,12 @@
 # Only available as openmpi flavor, and not in Factory
 %bcond_with pastix
 
+%if 0%{suse_version} < 1550
+%define python_ver 2
+%else
+%define python_ver 3
+%endif
+
 %if 0%{?sle_version} >= 150200
 %define DisOMPI1 ExclusiveArch:  do_not_build
 %endif
@@ -302,8 +308,10 @@
 %if 0%{!?makedoc:1}
 BuildRequires:  fdupes
 BuildRequires:  pkg-config
-BuildRequires:  python2
-BuildRequires:  python3
+%if %{python_ver} == 2
+BuildRequires:  python2-base
+%endif
+BuildRequires:  python3-base
 %if 0%{?suse_version} >= 1315
 BuildRequires:  hwloc-devel
 %endif
@@ -433,6 +441,16 @@
 %patch0 -p1 -b .rpath
 %patch1 -p1 -b .pastix-detect
 
+# Fix shebangs in packaged scripts
+find src lib config -type f -iname \*.py -exec sed -i \
+  -e '1 s@#!.*env python3@#!/usr/bin/python3@' \
+  -e '1 s@#!.*env python@#!/usr/bin/python%{python_ver}@' \
+  \{\} \;
+find lib/petsc/bin -type f -exec sed -i \
+  -e '1 s@#!.*env python3@#!/usr/bin/python3@' \
+  -e '1 s@#!.*env python@#!/usr/bin/python%{python_ver}@' \
+  \{\} \;
+
 %if 0%{?makedoc:1}
 %files doc
 %defattr(-,root,root,-)
@@ -463,7 +481,7 @@
 export ARCHCFLAGS=-fPIC
 %endif
 
-./config/configure.py \
+python%{python_ver} ./config/configure.py \
        --CFLAGS="$RPM_OPT_FLAGS $ARCHCFLAGS" \
        --FFLAGS="$RPM_OPT_FLAGS $ARCHCFLAGS" \
        --CXXFLAGS="$RPM_OPT_FLAGS $ARCHCFLAGS" \
@@ -472,6 +490,7 @@
         --with-c-support \
        --with-fortran-interfaces=1 \
        --with-debugging=no \
+       --with-python-exec=python%{python_ver} \
        --with-shared-libraries \
        --with-batch=0 \
 %if %{without hpc}
@@ -608,7 +627,7 @@
 [ -s $tmp ] && { echo "One or more python script not Python 3 compliant!"; cat 
$tmp; exit 1; }
 rm -f $tmp
 
-#pyton_sitesearch_path=%{hpc_python_sitearch_no_singlespec}
+#python_sitearch_path=%%{hpc_python_sitearch_no_singlespec}
 %hpc_write_modules_files
 
#%%Module1.0#####################################################################
 
@@ -646,8 +665,8 @@
 
 prepend-path    PATH                %{hpc_prefix}/lib/petsc/bin
 prepend-path    LD_LIBRARY_PATH     %{hpc_libdir}
-if {[file isdirectory  $pyton_sitesearch_path]} {
-prepend-path    PYTHONPATH          $pyton_sitesearch_path
+if {[file isdirectory  $python_sitearch_path]} {
+prepend-path    PYTHONPATH          $python_sitearch_path
 }
 
 setenv          %{hpc_upcase %pname}_DIR        %{hpc_prefix}


Reply via email to