distutils question

Pete Shinners pete at visionart.com
Tue May 22 15:29:08 EDT 2001


"Toby J Sargeant" <tjs at mail.csse.monash.edu.au> wrote 
> Is there any way to add to the command line arguments that a distutils
> aware package understands? i went down this route:
> 
> class my_build(build):
>    user_options=build.user_options+[
>       ('freetype-dir=',None,"root directory of freetype install")
>       ]
> 
> and failed dismally -- the new argument shows up in the --help list, but
> doesn't seem to be included in the information passed to getopt.
> 
> more geenerally, what's the preferred way of adding user specified paths
> for includes and libraries?

hello toby, if you ever do figure a way to add commandline args
like this, i'm also interested. it does seem like it should be
possible, but i dunno how.

i think one of the more popular methods is to create a file
like "config.py" which just defines a list of variables...

freetype_dir = "C:\\freetype"
compile_libs = ["freetype", "blah"]

then the setup script can just import that and read the user
defined variables? i dunno it may not be clean in your situation,
but i've seen that used and not grumbled too much as an end-user






More information about the Python-list mailing list