Changeset 1000


Ignore:
Timestamp:
21/06/08 11:50:37 (4 years ago)
Author:
Freddie Akeroyd
Message:

Add new python bindings to configure. Refs #101.

Location:
trunk
Files:
1 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bindings/Makefile.am

    r978 r1000  
    4242IDLSUB = idl 
    4343endif 
    44 SUBDIRS = $(F77SUB) $(F90SUB) $(JAVASUB) $(SWIGSUB) $(IDLSUB) 
     44if HAVE_PYTHON 
     45PYSUB = python 
     46endif 
     47SUBDIRS = $(F77SUB) $(F90SUB) $(JAVASUB) $(SWIGSUB) $(IDLSUB) $(PYSUB) 
  • trunk/bindings/swig/Makefile.am

    r984 r1000  
    3030AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/src 
    3131lib_LTLIBRARIES=$(LIBNXTCL) $(LIBNXSCHEME) $(LIBNXGUILE) # $(LIBNXPERL) 
    32 python_LTLIBRARIES=$(LIBNXPYTHON) 
    3332bin_PROGRAMS=$(NXINTER) $(NXGUILE) 
    3433 
    35 # python wrapper 
    36 if HAVE_SWIG 
    37 if HAVE_PYTHON 
    38 NXPYTHONWRAP=nxpython.py 
    39 nodist_python_PYTHON=$(NXPYTHONWRAP) 
    40 LIBNXPYTHON=libnxpython.la 
    41 libnxpython_la_SOURCES=$(COMMON_SRC) 
    42 nodist_libnxpython_la_SOURCES=$(PYTHONWRAP) 
    43 libnxpython_la_CFLAGS=-I$(PYTHONROOT)/include/python$(PYTHON_VERSION) -I$(PYTHONROOT)/include $(CFLAGS) 
    44 libnxpython_la_LDFLAGS=-L$(PYTHONROOT)/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) $(top_builddir)/src/libNeXus.la @SHARED_LDFLAGS@ $(LDFLAGS) 
    45 PYTHONWRAP=nxpython_wrap.c 
    46 endif 
    47 nxpython_wrap.c: nxinter.i nxdataset.i 
    48         $(SWIG) -I$(srcdir) -o $@ -python -module nxpython -interface libnxpython nxinter.i  
    49 endif 
     34# old python wrapper 
     35#python_LTLIBRARIES=$(LIBNXPYTHON) 
     36#if HAVE_SWIG 
     37#if HAVE_PYTHON 
     38#NXPYTHONWRAP=nxpython.py 
     39#nodist_python_PYTHON=$(NXPYTHONWRAP) 
     40#LIBNXPYTHON=libnxpython.la 
     41#libnxpython_la_SOURCES=$(COMMON_SRC) 
     42#nodist_libnxpython_la_SOURCES=$(PYTHONWRAP) 
     43#libnxpython_la_CFLAGS=-I$(PYTHONROOT)/include/python$(PYTHON_VERSION) -I$(PYTHONROOT)/include $(CFLAGS) 
     44#libnxpython_la_LDFLAGS=-L$(PYTHONROOT)/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) $(top_builddir)/src/libNeXus.la @SHARED_LDFLAGS@ $(LDFLAGS) 
     45#PYTHONWRAP=nxpython_wrap.c 
     46#endif 
     47#nxpython_wrap.c: nxinter.i nxdataset.i 
     48#       $(SWIG) -I$(srcdir) -o $@ -python -module nxpython -interface libnxpython nxinter.i  
     49#endif 
    5050 
    5151# perl wrapper (not working yet) 
     
    133133swigdoc_DATA    = $(DOC_OUTPUT) 
    134134 
    135 EXAMPLE_FILES = nxdstest.tcl nxexam.tcl nxpython_test.py nxintertest.tcl 
     135EXAMPLE_FILES = nxdstest.tcl nxexam.tcl nxintertest.tcl 
    136136swigexampledir  = $(NXEXAMPLEDIR)/swig 
    137137swigexample_DATA = $(EXAMPLE_FILES) 
  • trunk/configure.ac

    r978 r1000  
    221221 
    222222AC_ARG_WITH([swig], AC_HELP_STRING([--with-swig=swig compiler], [Specify path of swig compiler]), [with_swig=$withval], [with_swig=]) 
    223 if test x$with_python != xno -o x$with_tcl != xno -o x$with_guile != xno; then 
     223if test x$with_tcl != xno -o x$with_guile != xno; then 
    224224    if test x$with_swig != xyes; then 
    225225        SWIG=$with_swig 
     
    617617                bindings/swig/Makefile 
    618618                bindings/idl/Makefile 
     619                bindings/python/Makefile 
    619620                contrib/Makefile 
    620621                contrib/applications/Makefile 
     
    634635JAVABINDING=`if test -n "$JAVAC" ; then echo yes ; else echo no ; fi`  
    635636IDLBINDING=`if test -n "$IDLROOT" ; then echo yes ; else echo no ; fi`  
     637PYTHONBINDING=`if test -n "$PYTHONROOT" ; then echo yes ; else echo no ; fi`  
    636638if test -n "$SWIG" ; then  
    637639    SWIGBINDING="yes (" 
    638640    test -n "$TCLROOT" && SWIGBINDING="$SWIGBINDING tcl" 
    639641    test -n "$GUILEROOT" && SWIGBINDING="$SWIGBINDING guile" 
    640     test -n "$PYTHONROOT" && SWIGBINDING="$SWIGBINDING python" 
    641642    SWIGBINDING="$SWIGBINDING ) SWIG=${SWIG}" 
    642643else 
     
    666667                JAVA:          ${JAVABINDING} (--with-java-home=${javaroot}, JAVA=${JAVA}, JAVAC=${JAVAC}, JAVAH=${JAVAH}) 
    667668                SWIG:          ${SWIGBINDING} 
    668                 IDL:           ${IDLBINDING} (--with-idlroot=${IDLROOT}) 
     669                 IDL:          ${IDLBINDING} (--with-idlroot=${IDLROOT}) 
     670              PYTHON:          ${PYTHONBINDING} 
    669671 
    670672Please check whether the configuration I detected matches what you would 
Note: See TracChangeset for help on using the changeset viewer.