python how to override a setup.cfg value ?

Chris Shenton chris at
Thu Aug 23 20:58:16 CEST 2007

I'm building python-ldap and need to change values of library and
include paths that are in the setup.cfg file.  This is an automated
build (using "buildit") so I'd prefer not to have edit the .cfg by hand,
with sed, or even with buildit's Substitute().

I'd like to be able to do something like I'd do with "make", specify a
value on the command line like:

  make -Dprefix=/usr/local

or in this case

  python -Dlibs="ldap lber" build   [Does NOT work]

I cannot see how to do this from the --help or from googling.  
The closest I've gotten is to do:

  python setopt --command=_ldap --option=libs --set-value="ldap lber"

but that overwrites the python.cfg, a bit rude it seems to me. 

Am I missing something? is there a way to override a .cfg value on the
command line while running a command like "build" or "install"?


More information about the Python-list mailing list