]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
Fix numpy compilation issue on Fedora 36 & 37 for embedded numpy
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 10 Jan 2023 13:00:03 +0000 (14:00 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 10 Jan 2023 13:00:03 +0000 (14:00 +0100)
products/compil_scripts/numpy-1.22.2.sh
products/patches/SPNS-29988-numpy-1.22.patch

index 3e8e7ae0feb30f1619c8f9811f0a9c10690804cd..05e370a7b81c86a393bec085fcbc3bf34761d1a2 100755 (executable)
@@ -27,8 +27,7 @@ PYTHONPATH=${NUMPY_INSTALL}:${PYTHONPATH}
 echo
 echo "*** setup.py build install"
 $PYTHONBIN setup.py build install --prefix=${PRODUCT_INSTALL} --install-lib=${NUMPY_INSTALL}
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
     echo "ERROR on setup build install"
     rm -f site.cfg
     exit 1
@@ -42,16 +41,16 @@ if [ -f numpy/_version.py ]; then
 else
     f=$(find . -type d -name "numpy-$VERSION-py${PYTHON_VERSION}-*x86_64.egg")
     if [ $? -eq 0 ]; then
-       EGG_DIR=$(ls numpy-$VERSION-py${PYTHON_VERSION}-*-x86_64.egg)
-       echo "INFO:  Found $EGG_DIR"
-       if [ ! -d $EGG_DIR/numpy ]; then
-           ln -sf $EGG_DIR/numpy
-           sed -i "s/0+unknown/$VERSION/g" $EGG_DIR/numpy/_version.py
-       else
-           echo "WARNING: could not find $EGG_DIR/numpy"
-       fi
+             EGG_DIR=$(ls |grep numpy-$VERSION-py${PYTHON_VERSION} |grep x86_64.egg)
+             echo "INFO:  Found $EGG_DIR"
+             if [ -d $EGG_DIR/numpy ]; then
+                 ln -sf $EGG_DIR/numpy
+                 sed -i "s/0+unknown/$VERSION/g" $EGG_DIR/numpy/_version.py
+             else
+                 echo "WARNING: could not find $EGG_DIR/numpy"
+             fi
     else
-       echo "WARNING: could not find egg directory with name: numpy-$VERSION-py${PYTHON_VERSION}-*-x86_64.egg"
+             echo "WARNING: could not find egg directory with name: numpy-$VERSION-py${PYTHON_VERSION}-*-x86_64.egg"
     fi
 fi
 
index 05860ca2dbeada166361419088220c18651175c0..ead2ad4ff524bb7312b2b76767f931d22950b918 100644 (file)
@@ -17,7 +17,7 @@ diff -Naur numpy-1.22.2_ref/setup.py numpy-1.22.2_dev/setup.py
      if verbose:
          print("no suitable tags, using unknown + full revision id")
 -    return {"version": "0+unknown",
-+    return {"version": "1.22.0",
++    return {"version": "1.22.2",
              "full-revisionid": keywords["full"].strip(),
              "dirty": False, "error": "no suitable tags", "date": None}
  
@@ -26,7 +26,7 @@ diff -Naur numpy-1.22.2_ref/setup.py numpy-1.22.2_dev/setup.py
          print("unable to compute version")
  
 -    return {"version": "0+unknown", "full-revisionid": None,
-+    return {"version": "1.22.0", "full-revisionid": None,
++    return {"version": "1.22.2", "full-revisionid": None,
              "dirty": None, "error": "unable to compute version",
              "date": None}