incorrect python bindings when python2.4-dev and python2.5-dev are present

Bug #514763 reported by Adrien Saladin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PTools
Confirmed
Medium
Unassigned

Bug Description

python: 2.4 and 2.5 installed. 2.4-dev and 2.5-dev
SConstruct needs to be modified

workaround: remove python2.4-dev package

Here is the log of python unittests:

ptools/Tests$ python unittest1.py
.EEE.E.EE..EE.EE
======================================================================
ERROR: testTranslation1 (__main__.TestBasicMoves)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 82, in testTranslation1
    CoM1 = self.rigid1.FindCenter()
ArgumentError: Python argument types in
    Rigidbody.FindCenter(Rigidbody)
did not match C++ signature:
    FindCenter(PTools::Rigidbody {lvalue})

======================================================================
ERROR: testTranslation2 (__main__.TestBasicMoves)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 93, in testTranslation2
    self.rigid2.Translate(vec1+vec2)
SystemError: NULL result without error in PyObject_Call

======================================================================
ERROR: testMinusOperator (__main__.TestCoord3D)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 18, in testMinusOperator
    coo3 = self.coo1 - self.coo2
SystemError: NULL result without error in PyObject_Call

======================================================================
ERROR: testPlusOperator (__main__.TestCoord3D)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 13, in testPlusOperator
    coo3 = self.coo1 + self.coo2
SystemError: NULL result without error in PyObject_Call

======================================================================
ERROR: testGetAtom (__main__.TestCoordsArray)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 115, in testGetAtom
    self.assertTrue( Norm2(c1 - Coord3D(3.0, 4.0, 5.0))<1e-6 )
SystemError: NULL result without error in PyObject_Call

======================================================================
ERROR: brief explanation:
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 137, in testSetCoords
    self.assertTrue(Norm2(co-co2)<1.0e-6)
SystemError: NULL result without error in PyObject_Call

======================================================================
ERROR: testCopy (__main__.TestRigidbody)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 35, in testCopy
    self.assertEqual(self.r.FindCenter(), s.FindCenter())
ArgumentError: Python argument types in
    Rigidbody.FindCenter(Rigidbody)
did not match C++ signature:
    FindCenter(PTools::Rigidbody {lvalue})

======================================================================
ERROR: testSetAtom (__main__.TestRigidbody)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 39, in testSetAtom
    atom = self.r.CopyAtom(3)
ArgumentError: Python argument types in
    Rigidbody.CopyAtom(Rigidbody, int)
did not match C++ signature:
    CopyAtom(Rigidbody_wrapper {lvalue}, unsigned int i)
    CopyAtom(PTools::Rigidbody {lvalue}, unsigned int i)

======================================================================
ERROR: in principle GetCoords(i,co) and unsafeGetCoords(i,co) should
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 64, in testUnsafeGetCoords
    co1 = self.r.GetCoords(i)
ArgumentError: Python argument types in
    Rigidbody.GetCoords(Rigidbody, int)
did not match C++ signature:
    GetCoords(PTools::Rigidbody {lvalue}, unsigned int i)

======================================================================
ERROR: testTransRot (__main__.TestSuperposition)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest1.py", line 161, in testTransRot
    sup = superpose(self.prot1,prot2) # superpose(reference, mobile)
ArgumentError: Python argument types in
    _ptools.superpose(Rigidbody, Rigidbody)
did not match C++ signature:
    superpose(PTools::Rigidbody ref, PTools::Rigidbody mob, int verbosity=0)

----------------------------------------------------------------------
Ran 16 tests in 0.129s

FAILED (errors=10)

Changed in ptools:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Adrien Saladin (adrien-saladin) wrote :

same problem when 2.5-dev and 2.6-dev debian packages are installed.

The default python version used for running "scons" should probably be picked for including python.h and the linking phase.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.