python setup.py: how to override a setup.cfg value ?

Discussion in 'Python' started by Chris Shenton, Aug 23, 2007.

  1. 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 setup.py -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 setup.py 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 setup.py command like "build" or "install"?

    Thanks.
    Chris Shenton, Aug 23, 2007
    #1
    1. Advertising

  2. Chris Shenton wrote:
    > 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().


    Almost everything in python-ldap's setup.cfg is subject to local system
    configuration. The default shipped in source distribtion has to be
    tweaked on most systems (examples: Build/setup.cfg.*). Therefore I don't
    understand why you don't just provide your own setup.cfg reflecting your
    OpenLDAP/OpenSSL/Cyrus-SASL/Kerberos installation.

    I don't know anything about "buildit" though.

    Ciao, Michael.
    =?ISO-8859-1?Q?Michael_Str=F6der?=, Aug 24, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. salvage

    CFG / INI file

    salvage, Mar 5, 2004, in forum: C++
    Replies:
    1
    Views:
    836
    Julie
    Mar 5, 2004
  2. Mike Meyer

    distutils setup.cfg question.

    Mike Meyer, Nov 19, 2004, in forum: Python
    Replies:
    2
    Views:
    652
    Mike Meyer
    Nov 19, 2004
  3. Alexandre Guimond

    libraries options not split in setup.cfg

    Alexandre Guimond, Oct 19, 2006, in forum: Python
    Replies:
    0
    Views:
    234
    Alexandre Guimond
    Oct 19, 2006
  4. Jasiu

    version in setup.cfg

    Jasiu, Feb 9, 2009, in forum: Python
    Replies:
    2
    Views:
    288
    Jasiu
    Feb 10, 2009
  5. Chris Withers
    Replies:
    0
    Views:
    191
    Chris Withers
    Sep 9, 2009
Loading...

Share This Page