[Distutils] a couple of distutils questions
Tue Jun 26 06:11:01 2001
This is my first use of the distutils package, so I accept that I might have
gone about things the wrong way.
Initially for my freetype 2 extension module, I used autoconf to build a
Setup.in file for building the module. I decided to switch to using distutils
recently, and in doing so wanted to still be able to provide the
--freetype-path and --with-pil-headers options to deal with different install
locations for freetype and PIL.
After a lot of poking around and many false starts, it seemed that there wasn't
a good way to handle command line arguments that didn't involve extensive
poking around in internal distutils objects.
Eventually I gave up and just used the following code:
'--freetype-path=' : optFreetypePath,
'--with-pil-headers=' : optPilHeaders
for k,v in handle.items():
if v is not None:
which seems like a rather large hack to me. What's the preferred distutils
Additionally, I noticed that the Extension object takes a
runtime_library_path option, but the unixcompiler object spits out a
-R/my/path option, which gcc doesn't like. Using extra_link_args seems
like a sure way to tie yourself down to one compiler, though, so I'm not
sure what I can do in this case.
[ Toby Sargeant : Inpharmatica : Developer : email@example.com ]
[ http://www.inpharmatica.co.uk : 020 7074 4600 fax 020 7631 4844 ]