[python-win32] distutils question

robin and jim robinjim@earthlink.net
Fri, 29 Mar 2002 03:09:20 -0700


Thanks for your response.

Please see my comments below.

----- Original Message -----
From: "Niki Spahiev" <niki@vintech.bg>
To: "Jim Vickroy" <Jim.Vickroy@noaa.gov>
Cc: <python-win32@python.org>
Sent: Friday, March 29, 2002 2:06 AM
Subject: Re: [python-win32] distutils question


> Jim Vickroy wrote:
> > I have written my first, simple setup.py for use with the distutils
>>

[snip]

> > 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?
>
> No but IMO you don't have __init__.py in GOES_12, GOES_12\SXI,
> GOES_12\SXI\GDS
>
> HTH
> Niki Spahiev
>
That is it exactly!

When an __init__ module is added to each directory ( GOES_12, GOES_12\SXI,
GOES_12\SXI\GDS) the import works without having to set PYTHONPATH or the MS
Windows Registry.  That is great!

The question is: how should setup.py be implemented to automate this so that
an __init__ module is placed in each directory as it is created during the
build?