Changeset 52558a in git


Ignore:
Timestamp:
Apr 1, 2020, 6:42:44 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
4cb8c8b789638ea52b5caa93a88616e1e21c1653
Parents:
04929b7464b309106ba29576ca010079b1acdefc
Message:
fix: make distcheck (python stuff, require 2.7)
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/machinelearning/tests/test_init_ml.c

    r04929b7 r52558a  
    22#include <stdlib.h>
    33#include "kernel/mod2.h"
     4#if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H)
     5#ifdef HAVE_PYTHON
    46#include <Python.h>
    57#include "mlpredict.h"
    68
    7 #if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H)
    8 #ifdef HAVE_PYTHON
    99
    1010/* this is found as an internal function in mlpredict.c, for use in testing */
  • m4/ax_python_embed.m4

    r04929b7 r52558a  
    324324[
    325325    AC_ARG_VAR( [PYTHON], [Python Executable Path] )
    326     AC_PATH_PROG( PYTHON, python, [], $1 )
     326    #AC_PATH_PROG( PYTHON, python, [], $1 )
    327327    if test -z "$PYTHON"
    328328    then
    329         AC_MSG_ERROR([Python Executable not found])
     329        AC_MSG_RESULT([Python Executable not found])
    330330    else
    331331        ax_python_use=true
     
    385385# AX_PYTHON_VERSION_CHECK( VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE] )
    386386# -----------------------------------------------------------------------------
    387 # Run ACTION-IF-TRUE if the Python interpreter has version >= VERSION.
     387# Run ACTION-IF-TRUE if the Python interpreter has version == VERSION.
    388388# Run ACTION-IF-FALSE otherwise.
    389389# This test uses sys.hexversion instead of the string equivalent (first
     
    397397    if test -n "$PYTHON"
    398398    then
    399         AC_MSG_CHECKING([whether $PYTHON version >= $1])
     399        AC_MSG_CHECKING([whether $PYTHON version == $1])
    400400        AX_PYTHON_RUN([
    401401import sys
     
    409409for i in range(0, 4): minverhex = (minverhex << 8) + minver[[i]]
    410410if sys.hexversion >= minverhex:
    411     sys.exit( 0 )
     411    if sys.hexversion <=0x03000000:
     412        sys.exit( 0 )
     413    else:
     414        sys.exit( 1 )
     415    fi
    412416else:
    413417    sys.exit( 1 )
     
    437441        [$1],
    438442        [AC_MSG_RESULT(yes)],
    439         [AC_MSG_ERROR(too old)]
     443        [AC_MSG_RESULT(no)
     444        PYTHON=""
     445        ax_ython_use=false]
    440446    )
    441447])
Note: See TracChangeset for help on using the changeset viewer.