[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python module macro check

From: Dave Fancella
Subject: Python module macro check
Date: Sun, 26 Jun 2005 17:49:27 -0500
User-agent: KMail/1.7.2


This is a drive-by submission, so I didn't subscribe to the list.

I've written a python module check macro for autoconf.  It's pretty short, 
I'll stick it at the end of this email.

Use it like this:

(checks for wxPython)

As you'll see in the macro, it just fires up Python and tries to import the 
module you pass.

If you guys take it, I'd appreciate a response just so I'll know when the next 
version comes out to start using it from there instead of using my own 
acinclude file.

Otherwise, hope this helps somebody.  :)


dnl macro that checks for specific modules in python
[AC_MSG_CHECKING(for module $1 in python)
echo "import $1" | python -
if test $? -ne 0 ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(You need the module $1 available to python for this package)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]