Forcing pythonInterp version to be the same that pythonLibs version

This commit is contained in:
Cedric Boudinet 2017-02-13 22:37:34 +01:00
parent 9dc1a36568
commit 8432ea8a13
2 changed files with 6 additions and 6 deletions

View file

@ -1,7 +1,7 @@
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
FIND_PACKAGE(PythonLibs REQUIRED)
FIND_PACKAGE ( PythonInterp REQUIRED )
FIND_PACKAGE ( PythonInterp ${PYTHONLIBS_VERSION_STRING} EXACT REQUIRED )
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
SET(CMAKE_SWIG_FLAGS "")

View file

@ -55,20 +55,20 @@ def testClient():
theVal = "testmodelSENSORS/TTMP1.TmpSp.setMag.f"
theValType = iec61850.IEC61850_FC_SP
temperatureSetpoint = iec61850.IedConnection_readFloatValue(con, theVal, theValType)
print temperatureSetpoint
print(temperatureSetpoint)
assert(temperatureValue[1]==0)
newValue= temperatureValue[0]+10
err = iec61850.IedConnection_writeFloatValue(con, theVal, theValType, newValue)
assert(err==0)
temperatureSetpoint = iec61850.IedConnection_readFloatValue(con, theVal, theValType)
print temperatureSetpoint
print(temperatureSetpoint)
assert(temperatureSetpoint[0]==newValue)
iec61850.IedConnection_close(con)
else:
print "Connection error"
print("Connection error")
sys.exit(-1)
iec61850.IedConnection_destroy(con)
print "client ok"
print("client ok")
try:
srv=myIECServer()
srvThread = threading.Thread(target = srv.run)
@ -78,6 +78,6 @@ try:
#signal.pause()
except:
running = 0
print "Error :"
print("Error :")
traceback.print_exc(file=sys.stdout)
sys.exit(-1)