Changeset 497 for trunk


Ignore:
Timestamp:
Jul 29, 2006, 11:07:47 PM (18 years ago)
Author:
dkearney
Message:

added checks to configure.in to find where python and perl live,
added .in files for python and perl build files
configure now builds perl/Makefile.PL and python/setup.py and fits
it with the correct values needed to build and install the module
in the correct directory, where it will live in the rappture distribution.
there had been talk of using env variables to point python and perl
to where these modules live, so that is the current line of thinking.
added queue module for python. the Rappture.queue module's purpose
is to make it easy to send a job to the pbs and condor queues and
track the job using rappture. pbs is kinda complete, condor is not
complete and is still being worked on. the signalHandler and tools
python modules came from left over code that all python rappture
applications might want to include to make the developers life
a little more enjoyable.

Location:
trunk
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r493 r497  
    1515        cd -
    1616#       make RpTcl;
    17 #       make RpPython;
    18 #       make RpPerl;
     17        make RpPython;
     18        make RpPerl;
    1919
    2020#############################################################################
     
    3131#############################################################################
    3232
     33RpPython:
     34        set -x;
     35        cd python; \
     36        @PYTHON@ setup.py \
     37                build_ext \
     38                --library-dirs=@prefix@/lib \
     39                --include-dirs=@prefix@/include/core \
     40                install \
     41                --prefix=@prefix@ \
     42
     43RpPerl:
     44        set -x;
     45        cd perl; \
     46        @PERL@ Makefile.PL PREFIX=@prefix@; \
     47        make; \
     48        make test; \
     49        make install;
     50
    3351clean:
    3452        cd examples/app-fermi/cee; make clean; cd -;
    3553        cd examples/app-fermi/fortran; make clean; cd -;
    3654        cd examples/c-example; make clean; cd -;
     55        cd perl; make clean; cd -;
     56        cd python; rm -rf build; cd -;
    3757        cd src; make clean; cd -;
    3858        cd src/matlab; make clean; cd -;
     
    4363        cd examples/app-fermi/fortran; make distclean; cd -;
    4464        cd examples/c-example; make distclean; cd -;
     65        cd perl; make clean; cd -;
     66        cd python; rm -rf build; cd -;
    4567        cd src; make distclean; cd -;
    4668        cd src/matlab; make distclean; cd -;
  • trunk/configure

    r494 r497  
    310310#endif"
    311311
    312 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 VERSION RP_BASE LIBOBJS LTLIBOBJS'
     312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 PERL PYTHON pythondir PYTHON_VERSION PYTHON_INCLUDES PYTHON_SITE_PACKAGES VERSION RP_BASE LIBOBJS LTLIBOBJS'
    313313ac_subst_files=''
    314314
     
    858858  cat <<\_ACEOF
    859859
     860Optional Packages:
     861  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
     862  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
     863  --with-perl=DIR         Build Perl bindings if found
     864  --with-python=DIR       Build Python bindings if found
     865
    860866Some influential environment variables:
    861867  CC          C compiler command
     
    42334239
    42344240# Provide some information about the compiler.
    4235 echo "$as_me:4235:" \
     4241echo "$as_me:4241:" \
    42364242     "checking for Fortran 77 compiler version" >&5
    42374243ac_compiler=`set X $ac_compile; echo $2`
     
    43784384
    43794385
     4386# Check whether --with-perl or --without-perl was given.
     4387if test "${with_perl+set}" = set; then
     4388  withval="$with_perl"
     4389
     4390fi;
     4391# Extract the first word of "perl", so it can be a program name with args.
     4392set dummy perl; ac_word=$2
     4393echo "$as_me:$LINENO: checking for $ac_word" >&5
     4394echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     4395if test "${ac_cv_prog_PERL+set}" = set; then
     4396  echo $ECHO_N "(cached) $ECHO_C" >&6
     4397else
     4398  if test -n "$PERL"; then
     4399  ac_cv_prog_PERL="$PERL" # Let the user override the test.
     4400else
     4401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4402for as_dir in $PATH
     4403do
     4404  IFS=$as_save_IFS
     4405  test -z "$as_dir" && as_dir=.
     4406  for ac_exec_ext in '' $ac_executable_extensions; do
     4407  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     4408    ac_cv_prog_PERL="perl"
     4409    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4410    break 2
     4411  fi
     4412done
     4413done
     4414
     4415  test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="false"
     4416fi
     4417fi
     4418PERL=$ac_cv_prog_PERL
     4419if test -n "$PERL"; then
     4420  echo "$as_me:$LINENO: result: $PERL" >&5
     4421echo "${ECHO_T}$PERL" >&6
     4422else
     4423  echo "$as_me:$LINENO: result: no" >&5
     4424echo "${ECHO_T}no" >&6
     4425fi
     4426
     4427
     4428
     4429PYTHON=
     4430PYTHON_VERSION=
     4431PYTHON_INCLUDES=
     4432PYTHON_SITE_PACKAGES=
     4433pythondir=
     4434
     4435# Check whether --with-python or --without-python was given.
     4436if test "${with_python+set}" = set; then
     4437  withval="$with_python"
     4438
     4439fi;
     4440if test "$with_python" != "no" ; then
     4441    if test -x "$with_python/bin/python"
     4442    then
     4443        echo Found python in $with_python/bin/python
     4444        PYTHON="$with_python/bin/python"
     4445    else
     4446        if test -x "$with_python"
     4447        then
     4448            echo Found python in $with_python
     4449            PYTHON="$with_python"
     4450        else
     4451            # Extract the first word of "python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args.
     4452set dummy python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2
     4453echo "$as_me:$LINENO: checking for $ac_word" >&5
     4454echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     4455if test "${ac_cv_path_PYTHON+set}" = set; then
     4456  echo $ECHO_N "(cached) $ECHO_C" >&6
     4457else
     4458  case $PYTHON in
     4459  [\\/]* | ?:[\\/]*)
     4460  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
     4461  ;;
     4462  *)
     4463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4464for as_dir in $PATH
     4465do
     4466  IFS=$as_save_IFS
     4467  test -z "$as_dir" && as_dir=.
     4468  for ac_exec_ext in '' $ac_executable_extensions; do
     4469  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     4470    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
     4471    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4472    break 2
     4473  fi
     4474done
     4475done
     4476
     4477  ;;
     4478esac
     4479fi
     4480PYTHON=$ac_cv_path_PYTHON
     4481
     4482if test -n "$PYTHON"; then
     4483  echo "$as_me:$LINENO: result: $PYTHON" >&5
     4484echo "${ECHO_T}$PYTHON" >&6
     4485else
     4486  echo "$as_me:$LINENO: result: no" >&5
     4487echo "${ECHO_T}no" >&6
     4488fi
     4489
     4490        fi
     4491    fi
     4492    if test "$PYTHON" != ""
     4493    then
     4494        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[0:3]"`
     4495    echo Found Python version $PYTHON_VERSION
     4496    fi
     4497    if test "$PYTHON_VERSION" != ""
     4498    then
     4499    if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
     4500       -d $with_python/lib/python$PYTHON_VERSION/site-packages
     4501    then
     4502        PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
     4503        PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
     4504    else
     4505        if test -r $prefix/include/python$PYTHON_VERSION/Python.h
     4506        then
     4507            PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
     4508            PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
     4509        else
     4510            if test -r /usr/include/python$PYTHON_VERSION/Python.h
     4511            then
     4512                PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
     4513                PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
     4514            else
     4515                echo could not find python$PYTHON_VERSION/Python.h
     4516            fi
     4517        fi
     4518        if test ! -d "$PYTHON_SITE_PACKAGES"
     4519        then
     4520            PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
     4521        fi
     4522    fi
     4523    fi
     4524    if test "$with_python" != ""
     4525    then
     4526        pythondir='$(PYTHON_SITE_PACKAGES)'
     4527    else
     4528        pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
     4529    fi
     4530fi
     4531
     4532
     4533
     4534
     4535
     4536
     4537
     4538
     4539
     4540
    43804541RP_BASE=`pwd`
    43814542
    43824543
    4383                                                                                           ac_config_files="$ac_config_files Makefile examples/app-fermi/cee/Makefile examples/app-fermi/fortran/Makefile examples/c-example/Makefile src/Makefile src/matlab/Makefile src/octave/Makefile test/Makefile gui/apps/rappture"
     4544                                                                                                              ac_config_files="$ac_config_files Makefile examples/app-fermi/cee/Makefile examples/app-fermi/fortran/Makefile examples/c-example/Makefile perl/Makefile.PL python/setup.py src/Makefile src/matlab/Makefile src/octave/Makefile test/Makefile gui/apps/rappture"
    43844545cat >confcache <<\_ACEOF
    43854546# This file is a shell script that caches the results of configure
     
    49365097  "examples/app-fermi/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/app-fermi/fortran/Makefile" ;;
    49375098  "examples/c-example/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/c-example/Makefile" ;;
     5099  "perl/Makefile.PL" ) CONFIG_FILES="$CONFIG_FILES perl/Makefile.PL" ;;
     5100  "python/setup.py" ) CONFIG_FILES="$CONFIG_FILES python/setup.py" ;;
    49385101  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
    49395102  "src/matlab/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/matlab/Makefile" ;;
     
    50415204s,@FFLAGS@,$FFLAGS,;t t
    50425205s,@ac_ct_F77@,$ac_ct_F77,;t t
     5206s,@PERL@,$PERL,;t t
     5207s,@PYTHON@,$PYTHON,;t t
     5208s,@pythondir@,$pythondir,;t t
     5209s,@PYTHON_VERSION@,$PYTHON_VERSION,;t t
     5210s,@PYTHON_INCLUDES@,$PYTHON_INCLUDES,;t t
     5211s,@PYTHON_SITE_PACKAGES@,$PYTHON_SITE_PACKAGES,;t t
    50435212s,@VERSION@,$VERSION,;t t
    50445213s,@RP_BASE@,$RP_BASE,;t t
  • trunk/configure.in

    r493 r497  
    3535AC_PROG_F77([f77 fort77 g77 f90 xlf xlf90 fl32])
    3636
     37dnl perl and python check borrowed from
     38dnl http://www.opensource.apple.com/darwinsource/Current/libxslt-8.1/libxslt/configure.in
     39dnl
     40dnl Perl is just needed for generating some data for XSLtmark
     41dnl
     42
     43AC_ARG_WITH(perl, [  --with-perl[=DIR]         Build Perl bindings if found])
     44AC_CHECK_PROG(PERL, perl, perl, false)
     45dnl AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false")
     46
     47dnl
     48dnl check for python
     49dnl
     50
     51PYTHON=
     52PYTHON_VERSION=
     53PYTHON_INCLUDES=
     54PYTHON_SITE_PACKAGES=
     55pythondir=
     56AC_ARG_WITH(python, [  --with-python[=DIR]       Build Python bindings if found])
     57if test "$with_python" != "no" ; then
     58    if test -x "$with_python/bin/python"
     59    then
     60        echo Found python in $with_python/bin/python
     61        PYTHON="$with_python/bin/python"
     62    else
     63        if test -x "$with_python"
     64        then
     65            echo Found python in $with_python
     66            PYTHON="$with_python"
     67        else
     68            AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
     69        fi
     70    fi
     71    if test "$PYTHON" != ""
     72    then
     73        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
     74    echo Found Python version $PYTHON_VERSION
     75dnl    LIBXML2_PYTHON=`$PYTHON -c "try : import libxml2 ; print 1
     76dnl except: print 0"`
     77dnl     if test "$LIBXML2_PYTHON" = "1"
     78dnl     then
     79dnl         echo Found libxml2-python module
     80dnl     else
     81dnl         echo Warning: Missing libxml2-python
     82dnl     fi
     83    fi
     84    if test "$PYTHON_VERSION" != ""
     85    then
     86    if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
     87       -d $with_python/lib/python$PYTHON_VERSION/site-packages
     88    then
     89        PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
     90        PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
     91    else
     92        if test -r $prefix/include/python$PYTHON_VERSION/Python.h
     93        then
     94            PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
     95            PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
     96        else
     97            if test -r /usr/include/python$PYTHON_VERSION/Python.h
     98            then
     99                PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
     100                PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
     101            else
     102                echo could not find python$PYTHON_VERSION/Python.h
     103            fi
     104        fi
     105        if test ! -d "$PYTHON_SITE_PACKAGES"
     106        then
     107            PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
     108        fi
     109    fi
     110    fi
     111    if test "$with_python" != ""
     112    then
     113        pythondir='$(PYTHON_SITE_PACKAGES)'
     114    else
     115        pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
     116    fi
     117fi
     118dnl AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
     119dnl if test "$PYTHON_INCLUDES" != ""
     120dnl then
     121dnl     PYTHON_SUBDIR=python
     122dnl else
     123dnl     PYTHON_SUBDIR=
     124dnl fi
     125AC_SUBST(pythondir)
     126dnl AC_SUBST(PYTHON_SUBDIR)
     127
     128AC_SUBST(PERL)
     129AC_SUBST(PYTHON)
     130AC_SUBST(PYTHON_VERSION)
     131AC_SUBST(PYTHON_INCLUDES)
     132AC_SUBST(PYTHON_SITE_PACKAGES)
     133
    37134AC_SUBST(VERSION)
    38135
     
    45142            examples/app-fermi/fortran/Makefile \
    46143            examples/c-example/Makefile \
     144            perl/Makefile.PL \
     145            python/setup.py \
    47146            src/Makefile \
    48147            src/matlab/Makefile \
Note: See TracChangeset for help on using the changeset viewer.