Changeset 52558a in git
- Timestamp:
- Apr 1, 2020, 6:42:44 PM (4 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 4cb8c8b789638ea52b5caa93a88616e1e21c1653
- Parents:
- 04929b7464b309106ba29576ca010079b1acdefc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/machinelearning/tests/test_init_ml.c
r04929b7 r52558a 2 2 #include <stdlib.h> 3 3 #include "kernel/mod2.h" 4 #if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H) 5 #ifdef HAVE_PYTHON 4 6 #include <Python.h> 5 7 #include "mlpredict.h" 6 8 7 #if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H)8 #ifdef HAVE_PYTHON9 9 10 10 /* this is found as an internal function in mlpredict.c, for use in testing */ -
m4/ax_python_embed.m4
r04929b7 r52558a 324 324 [ 325 325 AC_ARG_VAR( [PYTHON], [Python Executable Path] ) 326 AC_PATH_PROG( PYTHON, python, [], $1 )326 #AC_PATH_PROG( PYTHON, python, [], $1 ) 327 327 if test -z "$PYTHON" 328 328 then 329 AC_MSG_ ERROR([Python Executable not found])329 AC_MSG_RESULT([Python Executable not found]) 330 330 else 331 331 ax_python_use=true … … 385 385 # AX_PYTHON_VERSION_CHECK( VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE] ) 386 386 # ----------------------------------------------------------------------------- 387 # Run ACTION-IF-TRUE if the Python interpreter has version >= VERSION.387 # Run ACTION-IF-TRUE if the Python interpreter has version == VERSION. 388 388 # Run ACTION-IF-FALSE otherwise. 389 389 # This test uses sys.hexversion instead of the string equivalent (first … … 397 397 if test -n "$PYTHON" 398 398 then 399 AC_MSG_CHECKING([whether $PYTHON version >= $1])399 AC_MSG_CHECKING([whether $PYTHON version == $1]) 400 400 AX_PYTHON_RUN([ 401 401 import sys … … 409 409 for i in range(0, 4): minverhex = (minverhex << 8) + minver[[i]] 410 410 if sys.hexversion >= minverhex: 411 sys.exit( 0 ) 411 if sys.hexversion <=0x03000000: 412 sys.exit( 0 ) 413 else: 414 sys.exit( 1 ) 415 fi 412 416 else: 413 417 sys.exit( 1 ) … … 437 441 [$1], 438 442 [AC_MSG_RESULT(yes)], 439 [AC_MSG_ERROR(too old)] 443 [AC_MSG_RESULT(no) 444 PYTHON="" 445 ax_ython_use=false] 440 446 ) 441 447 ])
Note: See TracChangeset
for help on using the changeset viewer.