• Subject: Re: python support in CVS.
  • From: Carey Evans <c.evans@xxxxxxxxxxxx>
  • Date: 26 Nov 2000 22:04:33 +1300
  • User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Channel Islands)

I've tried out the Python support, and I've found some problems with
the configure.in code.  Some of this might be because my /bin/sh is
ash, not bash.

When running configure, I get the following output:

checking for python... /usr/bin/python
checking for python prefix... Traceback (innermost last):
  File "<stdin>", line 3, in ?
NameError: EOF
checking for python version... Traceback (innermost last):
  File "<stdin>", line 3, in ?
NameError: EOF

Part of the problem is that the <<EOF isn't being recognised by the
shell.  There's also that standard error should be getting redirected
to config.log.

Instead of the quite complicated code to work out the Python version,
I'd suggest:

  PYTHON_VERSION="`$PYTHON -c 'import sys; print sys.version[[:3]]' 2>&5`"

with similar code for PYTHON_PREFIX.

Looking at the configure.in, I also wonder why the glib.m4 code that
comes with glib isn't being used to set CFLAGS and LIBS, making it a
lot simpler.  This patch makes both these changes.

--- configure.in.dist   Sun Nov 26 21:41:45 2000
+++ configure.in        Sun Nov 26 21:42:23 2000
@@ -18,18 +18,9 @@
 dnl *
 dnl * Not using gnome, so look for glib and GTK+ instead.
 dnl *
-if test x$GLIB_CONFIG = xno ; then
-       AC_MSG_ERROR(** Can't find glib-config.  Is glib installed? **)
-AC_MSG_CHECKING(for glib C flags)
-GLIB_CFLAGS="`$GLIB_CONFIG --cflags glib`"
-AC_MSG_CHECKING(for glib libs)
-GLIB_LIBS="`$GLIB_CONFIG --libs glib`"
 dnl *
 dnl * Check for SWIG
@@ -44,22 +35,12 @@
 if test x$PYTHON != xno ; then
   AC_MSG_CHECKING(for python prefix)
-import sys
-print sys.exec_prefix
+  PYTHON_PREFIX="`$PYTHON -c 'import sys; print sys.exec_prefix' 2>&5`"
   AC_MSG_CHECKING(for python version)
-import sys
-print sys.version[:3]
+  PYTHON_VERSION="`$PYTHON -c 'import sys; print sys.version[[:3]]' 2>&5`"

         Carey Evans  http://home.clear.net.nz/pages/c.evans/
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.