Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'modified': 0.07; 'subject:Question': 0.07; 'append': 0.09; 'linker': 0.09; 'setup.py': 0.09; 'subject:How': 0.10; 'python': 0.11; 'objects.': 0.16; 'skip:[ 30': 0.16; 'subject:Add': 0.16; 'all,': 0.19; 'basically': 0.19; 'seems': 0.21; 'command': 0.22; 'to:name :python-list@python.org': 0.22; 'copied': 0.24; 'skip:e 30': 0.24; 'script': 0.25; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'option': 0.32; 'run': 0.32; 'another': 0.32; 'received:google.com': 0.35; 'add': 0.35; 'building': 0.35; 'subject:?': 0.36; 'area': 0.37; 'being': 0.38; 'skip:[ 10': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'subject:Build': 0.68 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=aJWlW/+Fm3pbviqBNmEJbrIGZGqmgRg2TBMa5k3kzPU=; b=FVmQAs1IfCoP54otYeIyhQ0OEXvdS5TyLzPmwqZUrTuWkKYI0eGMFyYVb+fKZu2SRZ u7tuwD+h4nkLAiqVmzveP1Tl54qCXbYjHLtQ+M9as66sRjoH3eW2HTBUXumtyYDoBAyl FmVTcSm6UrHmewd9GPegSYHnMwqTHbyMIiXjl2od7vdEtMHPlgmzS5kfr+S8kNwvQjaC ovhWJZB8aExg9VWiGX8BTVnp6dgwskeadYyyZpQLn5Q+1ZfPqsJ9l47uWR1ekNf6J9M0 MgVkFPA3f5tONab3ftgu71TgvSPWm5QgLOsUG+9Mrj0e9VuoZUPgkiH4zw+b5XzSC05B T23A== MIME-Version: 1.0 X-Received: by 10.202.45.4 with SMTP id t4mr97454oit.130.1414425286091; Mon, 27 Oct 2014 08:54:46 -0700 (PDT) Date: Mon, 27 Oct 2014 10:54:46 -0500 Subject: Build Question: How to Add -Wl,--option Before Objects In Setup.py? From: Cyd Haselton To: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414425294 news.xs4all.nl 2842 [2001:888:2000:d::a6]:37966 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79793 I need to add a linker option to the command(s) run by setup.py when building various objects. I'm not familiar with Python at all, so I basically copied and modified a line from one area of the script to another ext_modules=[Extension('_struct', ['_struct.c'], extra_link_args = ['Wl,--allow-shlib-undefined'])], *snip* Unfortunately this seems to append the option to the end of the command line. What's the best (fastest) way to add it before the object being built (objectname.o)?