I mean *setup.py* ! ... (more questions)

Donn Cave donn at oz.net
Fri Jan 26 03:14:45 EST 2001


Quoth Mike Romberg <romberg at smaug.fsl.noaa.gov>:
| >>>>> " " == Andrew Kuchling <akuchlin at mems-exchange.org> writes:
|
| [snip]
|
|      > Right now the only way to fiddle with setup.py is to edit it,
|      > and submit patches back.  I'm planning to have some
|      > command-line switches in the next alpha.
|
|
|   Is there some way to persuade setup.py to look for libraries and
| header files (used to build things like _tkinter) in places the
| compiler normally does not?  I found that the build_ext command will
| take -I and -L switches.  But the build command does not seem to like
| them.  For now, is just editing the lib_dirs and inc_dirs arguments to
| detect_tkinter() the way to do this?

I had a handful of things that needed to be modified in setup.py,
for BeOS, so just for to see if it could be done, I worked those
in from the configure script by way of setup.cfg.  setup.cfg now
might look like (for a typical UNIX platform)

   [install]
   install_platlib = /usr/local/lib/python2.1/lib-dynload

   [extensions]
   disable = crypt zlib

   [paths]
   systemlibs = /lib /usr/lib
   locallibs = /usr/local/lib
   systemincludes = /usr/include
   localincludes = /usr/local/include

   [libraries]
   math = -lm

setup.py needed to be modified to notice those options, and
of course setup.cfg.in and configure.  I would be happy to
send the stuff to interested parties - kind of an armload of
stuff with all the affected files, though not much actually
new code.  The only hard part was figuring out (I'm new to
distutils) that I could get a dict of the section options
with self.distribution.get_option_dict(section).

	Donn Cave, donn at oz.net



More information about the Python-list mailing list