Changeset a2745d in git


Ignore:
Timestamp:
Oct 5, 2005, 9:23:21 AM (19 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
c63381543b91935cc4a63be0970edeb34fb4e057
Parents:
29e62514626f845660020d97137e7ff0ee326383
Message:
Cygwin Python
extra.cc --> Funktion system("python", cmd)
extra.cc --> Funktion system("ipython")
Makefile.in --> Includes und Linker (nur in ix86-Win Umgebungen)


git-svn-id: file:///usr/local/Singular/svn/trunk@8684 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/Makefile.in

    r29e625 ra2745d  
    4242BISON           = bison
    4343INSTALL         = @INSTALL@
    44 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 
     44INSTALL_PROGRAM = @INSTALL_PROGRAM@
    4545INSTALL_DATA    = @INSTALL_DATA@
    4646MKINSTALLDIRS   = ./mkinstalldirs
     
    5454CXXFLAGS        = @CXXFLAGS@ ${PIPE}
    5555CXXTEMPLFLAGS   = @CXXTEMPLFLAGS@
     56ifneq ($(SINGUNAME),ix86-Win)
    5657CPPFLAGS        = -I${srcdir} -I../kernel @CPPFLAGS@
     58else
     59## Dirs after @CPPFLAGS@ are for PySingular
     60CPPFLAGS        = -I${srcdir} -I../kernel @CPPFLAGS@ -I/usr/include/python2.4 -I/usr/local/include/boost-1_32 -I/home/Singular/singular-python/modules/python
     61endif
    5762DEFS            = -DNDEBUG -DOM_NDEBUG -D@SING_UNAME@ @DEFS@
    5863LDFLAGS2        = @LDFLAGS@
     
    6065LDFLAGS         = -L../kernel -lkernel @LDFLAGS@
    6166else
    62 LDFLAGS         = -L../kernel -L/bin -lkernel @LDFLAGS@
     67## -L/usr/local/lib -L/home/Singular/singular-python/modules/python --> PySingular
     68LDFLAGS         = -L../kernel -L/bin -lkernel @LDFLAGS@ -L/usr/local/lib -L../modules/python
    6369endif
    6470LDFLAGSG        = -L../kernel -lkernel-g @LDFLAGS@
     
    7379# arguments to link
    7480ifneq ($(SINGUNAME),ix86-Win)
    75 LIBS            = -lm @NEED_LIBS@ 
     81LIBS            = -lm @NEED_LIBS@
    7682else
    77 LIBS            = -lsingfac -lsingcf -lntl  -static -lreadline -lhtmlhelp -Xlinker -Bdynamic -lgmp -lcygncurses6
     83LIBS            = -lsingfac -lsingcf -lntl  -static -lreadline -lhtmlhelp -Xlinker -Bdynamic -lgmp -lcygncurses6 -lpython_module -lpython2.4 /usr/local/lib/libboost_python-gcc-d-1_32.dll
    7884endif
    7985MP_LIBS         = @MP_LIBS@
     
    8288
    8389ifdef LD_STATIC
    84 LDFLAGS  := ${STATIC_LDFLAGS} ${LDFLAGS} 
     90LDFLAGS  := ${STATIC_LDFLAGS} ${LDFLAGS}
    8591SING_EXEC = Singular-static
    86 LIBS := ${MP_LIBS} ${LIBS} 
     92LIBS := ${MP_LIBS} ${LIBS}
    8793DL_KERNEL =
    8894else
    89 LDFLAGS  := ${LD_DYN_FLAGS} ${LDFLAGS} 
     95LDFLAGS  := ${LD_DYN_FLAGS} ${LDFLAGS}
    9096SING_EXEC = Singular
    9197endif
     
    174180        gms.h pcv.h eigenval_ip.h \
    175181        fegetopt.h distrib.h walk.h \
    176         static.h\
     182        static.h \
    177183        omSingularConfig.h
    178184
  • Singular/extra.cc

    r29e625 ra2745d  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.229 2005-07-27 15:47:53 Singular Exp $ */
     4/* $Id: extra.cc,v 1.230 2005-10-05 07:23:21 wienand Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    131131//#endif /* not HAVE_DYNAMIC_LOADING */
    132132
     133#ifdef ix86_Win
     134#include <Python.h>
     135#include <python_wrapper.h>
     136#endif
     137
     138
    133139// see clapsing.cc for a description of the `FACTORY_*' options
    134140
     
    152158extern BOOLEAN jjJanetBasis(leftv res, leftv v);
    153159
     160#ifdef ix86_Win  /* PySingular initialized? */
     161static int PyInitialized = 0;
     162#endif
    154163
    155164//void emStart();
     
    26042613        mipo_id->m[i]=p;
    26052614      }
    2606       new_ring->minideal=id_Copy(alg_ring->qideal,new_ring); 
     2615      new_ring->minideal=id_Copy(alg_ring->qideal,new_ring);
    26072616      // convert factors =============================================
    26082617      ideal fac_id=idInit(L.length(),1);
     
    26202629      LL->m[0].rtyp=IDEAL_CMD;
    26212630      LL->m[0].data=(char *)fac_id;
    2622       LL->m[1].rtyp=INTVEC_CMD; 
     2631      LL->m[1].rtyp=INTVEC_CMD;
    26232632      LL->m[1].data=(char *)v;
    26242633      IDDATA(hh)=(char *)LL;
    2625  
     2634
    26262635      rChangeCurrRing(save_currRing);
    26272636      currRingHdl=save_currRingHdl;
     
    26332642    }
    26342643    else
     2644#endif
     2645#ifdef ix86_Win
     2646/*==================== Python Singular =================*/
     2647    if (strcmp(sys_cmd, "python") == 0)
     2648    {
     2649      const char* c;
     2650      if ((h!=NULL) && (h->Typ()==STRING_CMD))
     2651      {
     2652        c=(const char*)h->Data();
     2653        if (!PyInitialized) {
     2654          PyInitialized = 1;
     2655          Py_Initialize();
     2656          initPySingular();
     2657        }
     2658        PyRun_SimpleString(c);
     2659        return FALSE;
     2660      }
     2661      else return TRUE;
     2662    }
     2663    else
     2664/*==================== Python Singular =================*/
     2665    if (strcmp(sys_cmd, "ipython") == 0)
     2666    {
     2667      const char* c;
     2668      {
     2669        if (!PyInitialized) {
     2670          PyInitialized = 1;
     2671          Py_Initialize();
     2672          initPySingular();
     2673        }
     2674        PyRun_SimpleString(
     2675"try:                                                                                       \n\
     2676    __IPYTHON__                                                                             \n\
     2677except NameError:                                                                           \n\
     2678    argv = ['']                                                                             \n\
     2679    banner = exit_msg = ''                                                                  \n\
     2680else:                                                                                       \n\
     2681    # Command-line options for IPython (a list like sys.argv)                               \n\
     2682    argv = ['-pi1','In <\\#>:','-pi2','   .\\D.:','-po','Out<\\#>:']                        \n\
     2683    banner = '*** Nested interpreter ***'                                                   \n\
     2684    exit_msg = '*** Back in main IPython ***'                                               \n\
     2685                                                                                            \n\
     2686# First import the embeddable shell class                                                   \n\
     2687from IPython.Shell import IPShellEmbed                                                      \n\
     2688# Now create the IPython shell instance. Put ipshell() anywhere in your code                \n\
     2689# where you want it to open.                                                                \n\
     2690ipshell = IPShellEmbed(argv,banner=banner,exit_msg=exit_msg)                                \n\
     2691ipshell()");
     2692        return FALSE;
     2693      }
     2694    }
     2695    else
     2696
    26352697#endif
    26362698/*==================== Error =================*/
     
    26402702}
    26412703#endif // HAVE_EXTENDED_SYSTEM
     2704
Note: See TracChangeset for help on using the changeset viewer.