[python-win32] distutils question

Jens B. Jorgensen jens.jorgensen@tallan.com
Thu, 28 Mar 2002 16:38:45 -0600


Jim Vickroy wrote:

>I have written my first, simple setup.py for use with the distutils
>module; I am experiencing some problems.
>
>When it is exexcuted, the following output is generated:
>
>running install
>running build
>running build_py
>creating build
>creating build\lib
>creating build\lib\GOES_12
>creating build\lib\GOES_12\SXI
>creating build\lib\GOES_12\SXI\GDS
>creating build\lib\GOES_12\SXI\GDS\processor
>copying GOES_12\SXI\GDS\processor\__init__.py ->
>build\lib\GOES_12\SXI\GDS\processor
>copying GOES_12\SXI\GDS\processor\foo.py ->
>build\lib\GOES_12\SXI\GDS\processor
>running install_lib
>creating C:\Python22\Lib\site-packages\GOES_12
>creating C:\Python22\Lib\site-packages\GOES_12\SXI
>creating C:\Python22\Lib\site-packages\GOES_12\SXI\GDS
>creating C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor
>copying build\lib\GOES_12\SXI\GDS\processor\foo.py ->
>C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor
>copying build\lib\GOES_12\SXI\GDS\processor\__init__.py ->
>C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor
>byte-compiling
>C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor\foo.py to
>foo.pyc
>byte-compiling
>C:\Python22\Lib\site-packages\GOES_12\SXI\GDS\processor\__init__.py to
>__init__.pyc
>
>
>Everything looks fine; however, whenever I try to import it ...
>
>>>>import GOES_12.SXI.GDS.processor.foo
>>>>
>Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>ImportError: No module named GOES_12.SXI.GDS.processor.foo
>
>What have I overlooked?  Do I explicitly need to add the directory
>location to PYTHONPATH or the Windows registry?
>
Oh, actually yeah, you have to do this also. distutils will create it 
for you but unless you subsequently you need to either a) change to the 
base directory distutils puts the module into (the directory that 
contains the directory GOES_12) or then actually install the modules 
with the installer it creates.

-- 
Jens B. Jorgensen
jens.jorgensen@tallan.com