On Sat, Apr 24, 2004 at 01:42:48PM +0200, Jean-Claude Wippler wrote:
> I have a question for Python experts, w.r.t. distutils:
> 
> The other issue I ran into is testing:
> 
> $ python setup.py test
> running test
> running build
> running build_py
> running build_ext
> running config
> gcc -E -I/usr/include/python2.3 -o _configtest.i _configtest.c
> removing: _configtest.c _configtest.i
> Traceback (most recent call last):
>   File "setup.py", line 184, in ?
>     extra_objects=mkobjs,
>   File "/usr/lib/python2.3/distutils/core.py", line 149, in setup
>     dist.run_commands()
>   File "/usr/lib/python2.3/distutils/dist.py", line 907, in run_commands
>     self.run_command(cmd)
>   File "/usr/lib/python2.3/distutils/dist.py", line 927, in run_command
>     cmd_obj.run()
>   File "setup.py", line 133, in run
>     import test.regrtest
> ImportError: No module named regrtest
> $

There is a naming conflict between the stdlib test module and your
test.py

# python
Python 2.3.3 (#2, Feb 24 2004, 09:29:20)
Type "help", "copyright", "credits" or "license" for more information.
>>> import test
>>> test
<module 'test' from '/usr/lib/python2.3/test/__init__.pyc'>

# python
Python 2.3.3 (#2, Feb 24 2004, 09:29:20) 
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.insert(0, './test/')
>>> import test
>>> test
<module 'test' from './test/test.pyc'>

If you rename test.py to mktest.py you should be able to use both of
them.

-jackdied
_____________________________________________
Metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to