Ignore:
Timestamp:
Mar 1, 2017, 5:47:39 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
Children:
dc29160a567b9e04c172ea21b48f03a654afd0a8
Parents:
4d24f6272fb2b5388b2a23b455a78b4439e1eece
Message:
dyn_mod/python: adapt to autoconf/automake
File:
1 moved

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/python/python_module.cc

    r4d24f6 rf230d92  
    99#include <Python.h>
    1010#include <kernel/mod2.h>
    11 #include <tok.h>
     11#include <Singular/tok.h>
    1212#include <kernel/structs.h>
    1313#include <Singular/mod_lib.h>
    14 #include <ipid.h>
     14#include <Singular/ipid.h>
    1515
    16 #include <locals.h>
     16#include <Singular/locals.h>
    1717#include <omalloc/omalloc.h>
    1818
     
    5858extern "C" int SI_MOD_INIT(python_module)(SModulFunctions* psModulFunctions)
    5959{
     60  char *py=getenv("PYTHONPATH");
     61  char buf[1024];
     62  if (py!=NULL)
     63  {
     64    strcpy(buf,py);
     65    strcat(buf,":");
     66    strcat(buf,feResource('s',FALSE));
     67  }
     68  else
     69    strcpy(buf,feResource('s',FALSE));
     70  Print("setting PYTHONAPTH to %s\n",buf);
     71  setenv("PYTHONPATH",buf,1);
     72
    6073  Py_Initialize();
    6174  PyRun_SimpleString("from sys import path\n\
Note: See TracChangeset for help on using the changeset viewer.