Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'static': 0.04; '(using': 0.07; 'paths': 0.07; 'tries': 0.07; 'setup.py': 0.09; 'undefined': 0.09; 'python': 0.11; 'creates': 0.14; '[])': 0.16; 'cmake': 0.16; 'distutils,': 0.16; 'folks,': 0.16; 'ideally,': 0.16; 'library_dirs': 0.16; 'nick': 0.16; 'skipping': 0.16; 'subject:distutils': 0.16; 'ways:': 0.16; 'library': 0.18; 'module': 0.19; 'import': 0.22; 'install': 0.23; 'header:User- Agent:1': 0.23; 'module,': 0.24; 'fine': 0.24; 'software.': 0.24; 'question': 0.24; 'first,': 0.26; 'installed': 0.27; 'function': 0.29; 'received:10.0.0': 0.31; 'libraries': 0.31; 'question:': 0.31; 'file': 0.32; 'option': 0.32; 'sources': 0.33; 'problem': 0.35; 'something': 0.35; 'etc': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'library.': 0.36; 'thanks': 0.36; 'received:10.0': 0.36; 'so,': 0.37; 'two': 0.37; 'received:10': 0.37; 'message-id:@gmail.com': 0.38; 'depends': 0.38; 'skip:[ 10': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'help,': 0.39; 'to:addr:python.org': 0.39; 'consists': 0.60; 'complete': 0.62; 'details': 0.65; 'here': 0.66; 'compiling': 0.84; 'needed:': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=g3i/kGQH6Az8uJXbLdjfgFyw/6dOdY0zjyC7XmGdKCU=; b=U4Fc9wouV3ah5EGx6AXlzDC6RsReCOi5ZqQMi1vwc8fc31OFZRLaTYHwO2RBT0t6et EGDF6q7OB/LM45PzrokJGpQmtk2lEB9oZUL0pQqsNSS2YomdqnBzwr0G3Hyp0TtKxDOG SQbGSm0jJ0iDz49xYEnjxVubdpMT47Rro8eFNlz1hA7h0KB0JrTx3Mp/0F03N5ZSMZiH heg1dcWFvAarZmjiJm8LcO15xK3vZLSo1xx1FVhrxSWOezWdoJ0P/rwC5fSrCzTXXXdt n0BM6LBXR7r1D19ZH0JXtj2zvOg07ItU8k4XL3bBRivOaSqlYaT/PAzPL+RLClIIpLoc zPCA== X-Received: by 10.50.119.67 with SMTP id ks3mr17789209igb.90.1366727401662; Tue, 23 Apr 2013 07:30:01 -0700 (PDT) Date: Tue, 23 Apr 2013 09:29:59 -0500 From: Nick Gnedin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: python-list@python.org Subject: distutils and libraries Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366727411 news.xs4all.nl 2307 [2001:888:2000:d::a6]:38404 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44182 Folks, I would like to install a Python module from a complete library. So, my question: if I already have a fully build Python module libMyModule.so, is there a way to use setup.py to just install it, skipping the build step? Here are details if needed: My build process consists of 2 steps - first, I build a static library libtemp.a (using CMake) that depends on 3rd party software. From that library I build a python module by compiling the file my_py.cpp that contains PyInit_MyModule function etc for proper module initialization. I can build that module in two ways: by using CMake or distutils. CMake builds the module properly, finding all dependencies, and when I install it manually, everything works just fine - but then the problem is that it has to be installed manually. With distutils, when I use module1 = Extension('ifrit', libraries = ['temp'], library_dirs = ['.'], sources = ['my_py.cpp']) the module is build and installed, but when I import it, it does not find the 3rd party libraries and complain about undefined symbols. Adding all 3rd party library paths to setup.py is not an option - those can be installed by a user anywhere. So, ideally, I would like to do something like that module1 = Extension('ifrit', libraries = ['MyModule'], sources = []) where libMyModule.so is a complete Python module build by CMake, but that does not work because setup.py still tries to build the module from an already existing complete module, and just creates an empty library. So, my question again: if I already have a fully build Python module libMyModule.so, is there a way to use setup.py to just install it, skipping the build step? Many thanks for any help, Nick Gnedin