← Back to team overview

hugin-devs team mailing list archive

Re: [Bug 801869] Re: swig test needs to check version

 

On 2011-06-26 Yuv <801869@xxxxxxxxxxxxxxxxxx> wrote:
> can you try with something along the following please?  sorry I do not
> have time right now to do it myself.
[...]

Hello,

seems to work with minor changes.

Comparing build logs against 2.6.7 and 3.2.1 (actually 2.6.7 with an
edited patchlevel.h file yields this:
-------------------------------------
--- Found SWIG: /usr/bin/swig2.0 (found suitable version "2.0.4", required is "2.0.4")
+-- Found SWIG: /usr/bin/swig2.0 (found suitable version "2.0.4", required is "2.0")
 -- Using shared internal libraries
--- Python libs version: 3.2.1
+-- Python libs version: 2.6.7
-------------------------------------

In the attached patch I have also dropped the (now duplicated) python
version parsing code in src/hugin_script_interface/CMakeLists.txt

thanks for the quick help,
cu andreas


** Patch added: "versionedswigcheck.diff"
   https://bugs.launchpad.net/bugs/801869/+attachment/2181917/+files/versionedswigcheck.diff

-- 
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:
  In Progress

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


References