[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60167] trunk/blender/build_files/ build_environment/install_deps.sh: Add --required-numpy to force compilation of both py3.3 and numpy1. 7 in case you really need numpy and 1.7 is not available!

Bastien Montagne montagne29 at wanadoo.fr
Mon Sep 16 17:22:10 CEST 2013


Revision: 60167
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60167
Author:   mont29
Date:     2013-09-16 15:22:10 +0000 (Mon, 16 Sep 2013)
Log Message:
-----------
Add --required-numpy to force compilation of both py3.3 and numpy1.7 in case you really need numpy and 1.7 is not available!

Modified Paths:
--------------
    trunk/blender/build_files/build_environment/install_deps.sh

Modified: trunk/blender/build_files/build_environment/install_deps.sh
===================================================================
--- trunk/blender/build_files/build_environment/install_deps.sh	2013-09-16 14:38:33 UTC (rev 60166)
+++ trunk/blender/build_files/build_environment/install_deps.sh	2013-09-16 15:22:10 UTC (rev 60167)
@@ -166,8 +166,12 @@
         Unconditionally skip OpenCOLLADA installation/building.
 
     --skip-ffmpeg
-        Unconditionally skip FFMpeg installation/building.\""
+        Unconditionally skip FFMpeg installation/building.
 
+    --required-numpy
+        Use this in case your distro features a valid python package, but no matching Numpy one.
+        It will force compilation of both python 3.3 and numpy 1.7.\""
+
 ##### Main Vars #####
 
 PYTHON_VERSION="3.3.0"
@@ -181,6 +185,7 @@
 NUMPY_SOURCE="http://sourceforge.net/projects/numpy/files/NumPy/$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz"
 NUMPY_FORCE_REBUILD=false
 NUMPY_SKIP=false
+NUMPY_REQUIRED=false
 
 BOOST_VERSION="1.51.0"
 _boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
@@ -397,6 +402,9 @@
     --skip-ffmpeg)
       FFMPEG_SKIP=true; shift; continue
     ;;
+    --required-numpy)
+      NUMPY_REQUIRED=true; shift; continue
+    ;;
     --)
       # no more arguments to parse
       break
@@ -1974,6 +1982,7 @@
   if $PYTHON_SKIP; then
     INFO "WARNING! Skipping Python installation, as requested..."
   else
+    _do_compile=false
     check_package_DEB python$PYTHON_VERSION_MIN-dev
     if [ $? -eq 0 ]; then
       install_packages_DEB python$PYTHON_VERSION_MIN-dev
@@ -1984,12 +1993,21 @@
         check_package_DEB python$PYTHON_VERSION_MIN-numpy
         if [ $? -eq 0 ]; then
           install_packages_DEB python$PYTHON_VERSION_MIN-numpy
+        elif $NUMPY_REQUIRED; then
+          INFO "WARNING! Valid python package but no valid numpy package!"
+          INFO "         Building both Python and Numpy from sources!"
+          _do_compile=true
         else
-          INFO "WARNING! Sorry, using python package but no numpy package available!"
+          INFO "WARNING! Sorry, using python package but no valid numpy package available!"
+          INFO "         Use --required-numpy to force building of both Python and numpy."
         fi
       fi
       clean_Python
     else
+      _do_compile=true
+    fi
+
+    if $_do_compile; then
       compile_Python
       INFO ""
       if $NUMPY_SKIP; then
@@ -2381,6 +2399,7 @@
   if $PYTHON_SKIP; then
     INFO "WARNING! Skipping Python installation, as requested..."
   else
+    _do_compile=false
     check_package_version_match_RPM python3-devel $PYTHON_VERSION_MIN
     if [ $? -eq 0 ]; then
       install_packages_RPM python3-devel
@@ -2391,12 +2410,21 @@
         check_package_version_match_RPM python3-numpy $NUMPY_VERSION_MIN
         if [ $? -eq 0 ]; then
           install_packages_RPM python3-numpy
+        elif $NUMPY_REQUIRED; then
+          INFO "WARNING! Valid python package but no valid numpy package!"
+          INFO "         Building both Python and Numpy from sources!"
+          _do_compile=true
         else
-          INFO "WARNING! Sorry, using python package but no numpy package available!"
+          INFO "WARNING! Sorry, using python package but no valid numpy package available!"
+          INFO "         Use --required-numpy to force building of both Python and numpy."
         fi
       fi
       clean_Python
     else
+      _do_compile=true
+    fi
+
+    if $_do_compile; then
       compile_Python
       INFO ""
       if $NUMPY_SKIP; then
@@ -2661,6 +2689,7 @@
   if $PYTHON_SKIP; then
     INFO "WARNING! Skipping Python installation, as requested..."
   else
+    _do_compile=false
     check_package_version_ge_ARCH python $PYTHON_VERSION_MIN
     if [ $? -eq 0 ]; then
       install_packages_ARCH python
@@ -2672,21 +2701,28 @@
           check_package_version_ge_ARCH python-numpy $NUMPY_VERSION_MIN
           if [ $? -eq 0 ]; then
             install_packages_ARCH python-numpy
-          else
-            INFO "WARNING! Sorry, using python package but no numpy package available!"
+        elif $NUMPY_REQUIRED; then
+          INFO "WARNING! Valid python package but no valid numpy package!"
+          INFO "         Building both Python and Numpy from sources!"
+          _do_compile=true
+        else
+          INFO "WARNING! Sorry, using python package but no valid numpy package available!"
+          INFO "         Use --required-numpy to force building of both Python and numpy."
           fi
         fi
       fi
       clean_Python
     else
+      _do_compile=true
+    fi
+
+    if $_do_compile; then
       compile_Python
       INFO ""
-      if $WITH_NUMPY; then
-        if $NUMPY_SKIP; then
-          INFO "WARNING! Skipping NumPy installation, as requested..."
-        else
-          compile_Numpy
-        fi
+      if $NUMPY_SKIP; then
+        INFO "WARNING! Skipping NumPy installation, as requested..."
+      else
+        compile_Numpy
       fi
     fi
   fi




More information about the Bf-blender-cvs mailing list