← Back to team overview

hugin-devs team mailing list archive

[Bug 801869] [NEW] swig test needs to check version

 

Public bug reported:

According to 2011.2.0_beta1 README hsi has specific version requirements
on swig:

        SWIG >=2.0 - If Python >=3.2, SWIG must be >=2.0.4

However the CMake setup does not do any version checks.

FindPythonLibs seems to be one of the (imho very broken) cmake modules
that does return any versioning info, making it impossible to completely
express the abovementioned dependency without trickery. However FindSWIG
can do version checks, making part1 (swig >= 2.0) easy as pie:

--- CMakeLists.txt.orig 2011-06-25 09:03:31.000000000 +0200
+++ CMakeLists.txt      2011-06-25 09:03:54.000000000 +0200
@@ -295,7 +295,7 @@
 OPTION(BUILD_HSI "Python Scripting Interface" OFF)
 IF(BUILD_HSI)
   find_program(SWIG_EXECUTABLE NAMES swig2.0 swig)
-  FIND_PACKAGE(SWIG REQUIRED)
+  FIND_PACKAGE(SWIG 2.0 REQUIRED)
   INCLUDE(${SWIG_USE_FILE})

   FIND_PACKAGE(PythonLibs REQUIRED)

** Affects: hugin
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/801869

Title:
  swig test needs to check version

Status in Hugin - Panorama Tools GUI:
  New

Bug description:
  According to 2011.2.0_beta1 README hsi has specific version
  requirements on swig:

          SWIG >=2.0 - If Python >=3.2, SWIG must be >=2.0.4

  However the CMake setup does not do any version checks.

  FindPythonLibs seems to be one of the (imho very broken) cmake modules
  that does return any versioning info, making it impossible to
  completely express the abovementioned dependency without trickery.
  However FindSWIG can do version checks, making part1 (swig >= 2.0)
  easy as pie:

  --- CMakeLists.txt.orig 2011-06-25 09:03:31.000000000 +0200
  +++ CMakeLists.txt      2011-06-25 09:03:54.000000000 +0200
  @@ -295,7 +295,7 @@
   OPTION(BUILD_HSI "Python Scripting Interface" OFF)
   IF(BUILD_HSI)
     find_program(SWIG_EXECUTABLE NAMES swig2.0 swig)
  -  FIND_PACKAGE(SWIG REQUIRED)
  +  FIND_PACKAGE(SWIG 2.0 REQUIRED)
     INCLUDE(${SWIG_USE_FILE})

     FIND_PACKAGE(PythonLibs REQUIRED)

To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/801869/+subscriptions


Follow ups

References