distutils setup.cfg question.

Mike Meyer mwm at mired.org
Fri Nov 19 12:03:46 EST 2004


"Martin v. Löwis" <martin at v.loewis.de> writes:

> Mike Meyer wrote:
>> Ok, I give up. I searched the CVS code, and can't find the place that
>> turns an include_dirs option in setup.cfg into a list of
>> directories. The reason I was looking for it is that I can't figure
>> out how to make include_dirs include multiple directories from
>> setup.cfg. Everything I try winds up putting
>> -I<contents_of_include_dirs>. I couldn't even find the place where the
>> string value that is returned by ConfigParser is enclosed in a list.
>
> % grep include_dirs *.py */*.py
>
> This gives a long list. However, in two places, include_dirs is split:
> command/config.py:            self.include_dirs =
> string.split(self.include_dirs, os.pathsep)
> command/build_ext.py:            self.include_dirs =
> string.split(self.include_dirs, os.pathsep)

That's the code I was missing. And I missed it because I wasn't
looking in subdirectories (duh).

> Both places have similar code:
>
>          if self.include_dirs is None:
>              self.include_dirs = self.distribution.include_dirs or []
>          elif type(self.include_dirs) is StringType:
>              self.include_dirs = string.split(self.include_dirs, os.pathsep)

That helps immensely. But it seems to make setup.cfg non-portable, in
that you have to change the path separator in it to the one for the
platform you are on. I guess that since editing setup.cfg is expected,
that's not to bad.

Next question: I'd like to submit a bug report and patch for the
documentation of distutils. Where do I get copies of the source to
work on?

     Thanks,
     <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list