On 04/07/2010 10:55 PM, Chuck Swiger wrote:
> Hi--
> 
> On Apr 7, 2010, at 12:45 PM, Török Edwin wrote:
>> On 04/07/2010 10:31 PM, Jack Raats wrote:
>>>  File "/usr/local/lib/python2.5/threading.py", line 6, in <module>
>>>    import thread
>>> ImportError: No module named thread
>> Looks like an incomplete/broken install of python to me.
>> lit.py does 'import threading', threading.py is provided by your
>> system's python, but it tries to import a non-existent module ...
> 
> [ ... ]
>> $ python
>> Python 2.6.2 (r262:71600, Sep 21 2009, 11:00:25)
>> [GCC 4.2.1 20070719  [FreeBSD]] on freebsd8
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import threading
>>>>> import thread
> 
> ...works fine here, as well:
> 
> % python
> Python 2.6.4 (r264:75706, Nov 30 2009, 20:05:29) 
> [GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import thread
>>>> import threading
> 
> I suspect that Jack needs to:
> 
>   cd /usr/ports/lang/python25
>   make config
>   <<ensure THREADS option is enabled>>
> 
> ...then then build & reinstall a thread-aware python2.5 on your 7.x box.

Is there a way to detect if python was built with THREADS on or off?

I currently do this test:

python -V || { echo "Python not found, skipping LLVM tests"; exit 77; }
python <<EOF
import sys
if sys.hexversion < 0x2040000: sys.exit(1)
EOF
test $? -eq 0 || { echo "Python version older than 2.4, skipping LLVM
tests"; exit 77; }

If its not too complicated to detect THREADS, I can add that too, and
then skip 'make check' if a broken python is installed (maybe printing
only a warning).

Best regards,
--Edwin
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to