Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'python.': 0.02; 'subject:not': 0.03; 'third-party': 0.04; '(especially': 0.07; '---------': 0.07; 'binary': 0.07; 'paths': 0.07; 'from:addr:matt': 0.09; 'instances.': 0.09; 'setup.py': 0.09; 'subject:build': 0.09; 'python': 0.11; 'anyone?': 0.16; 'c++)': 0.16; 'doing,': 0.16; 'files)': 0.16; 'mixture': 0.16; 'subject: \n ': 0.16; 'subject:python': 0.16; 'extensions': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'module': 0.19; 'packages.': 0.19; 'projects,': 0.19; 'version.': 0.19; 'seems': 0.21; 'feb': 0.22; 'frameworks': 0.24; 'library,': 0.24; '(or': 0.24; 'extension': 0.26; 'header:In-Reply-To:1': 0.27; 'absolute': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'work.': 0.31; 'code': 0.31; 'getting': 0.31; 'helpful.': 0.31; 'libraries': 0.31; 'subject:that': 0.31; 'anyone': 0.31; 'file': 0.32; 'python.org': 0.32; "we're": 0.32; 'quite': 0.32; 'url:python': 0.33; 'community': 0.33; 'sense': 0.34; 'problem': 0.35; 'subject:with': 0.35; 'advice': 0.35; 'received:209.85': 0.35; 'common': 0.35; 'created': 0.35; 'problem.': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'c++': 0.36; 'instances': 0.36; 'url:listinfo': 0.36; 'doing': 0.36; 'shows': 0.36; 'possible': 0.36; 'url:org': 0.36; 'project': 0.37; 'list.': 0.37; 'received:209': 0.37; 'thank': 0.38; 'to:addr :python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'little': 0.38; 'does': 0.39; 'embedded': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'how': 0.40; 'tell': 0.60; 'new': 0.61; 'simple': 0.61; "you've": 0.63; 'our': 0.64; 'more': 0.64; 'different': 0.65; 'taking': 0.65; 'linked': 0.65; 'due': 0.66; 'insight': 0.68; 'containing': 0.69; 'article': 0.77; '2015': 0.84; 'skip:/ 30': 0.84; 'wheel': 0.84; 'differences': 0.93 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=u1EjVrQvzQ0hsMhcPz8vcj483JLRiPsjONqvDejHL2A=; b=DhBWGESMZAb26umzIA4UmAaQuUqF8goY3krSP7+I9GUskiCjXWIS5EFQ6bx/36UdtP 7PBVwDH04E5UZwD9Z/Q266VsG2C625rXEYPg4Jb/LjlYBzPww8G8ukpSSF+c3lBhG0zW +maUTEFTvB89o5e9zFZpwroj9lOo6kFJyxxSRXnNazR/Xwzii98LEjFzoT7HLyJgQYD3 nt1/nBcL+ib4oCKTkm4AXAZfyzo+rOm9bhOwhS2XMki7vmIfnp02obE/UVo37cQyG7Bp KJ2fkbelW2EXbe6GeIwCIxMz51zanNTxdhl9ctoKw7HUcY+A0KGABVjW3D/l0BVn5eQZ iXAA== X-Gm-Message-State: ALoCoQl6PpDXmODek8V6IUJFlQdERkQO+wzHsN3UkP/aN7ptSX8ObsnSqVebxgOGkRLA8sdYrqpa X-Received: by 10.202.191.194 with SMTP id p185mr986985oif.128.1423705508507; Wed, 11 Feb 2015 17:45:08 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Matthew Taylor Date: Wed, 11 Feb 2015 17:44:48 -0800 Subject: Re: building c extensions with setuptools that are not tied to python installed on build machine To: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Thu, 12 Feb 2015 09:01:33 +0100 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: 58 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1423728094 news.xs4all.nl 2841 [2001:888:2000:d::a6]:39943 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:85570 Ned, thank you for your insight on this problem. I will take your advice and do some more digging. You've been very helpful. Regards, --------- Matt Taylor OS Community Flag-Bearer Numenta On Wed, Feb 11, 2015 at 4:23 PM, Ned Deily wrote: > In article > , > Matthew Taylor wrote: >> Does this make sense to anyone? I'm still a little new to Python in >> general (especially binary packaging), and it seems like this would be >> a common problem for any projects with C extensions that need broad >> binary distribution. Does anyone have any suggestions? Please take a >> look at our setup.py file [4] and tell me if we're doing something >> egregiously wrong. > > Just taking a quick look at your setup.py there shows a quite > complicated build, including SWIG. One suggestion: keep in mind that > it's normal on OS X for the absolute path of shared libraries and > frameworks to be embedded in the linked binaries, including the C (or > C++) extension module bundles (.so files) built for Python packages. If > any of the .so files or any other binary artifacts (executables, shared > libraries) created by your package are linked to the Python > interpreter's shared library, that may be why you are getting a mixture > of Python instances. One way to check for this is to use: > > otool -L *.so *.dylib > > on all of the directories containing linked binaries in your project and > check for paths like: > /System/Library/Frameworks/Python.framework > > That would be a link to the Apple-supplied system Python. > > A link to /Library/Frameworks/Python.framework or some other path would > be to a third-party Python like from python.org or Homebrew. > > Due to differences in how the various Pythons are built and depending on > what the C or C++ code is doing, it may not be possible to have one > binary wheel that works with different Python instances of the same > version. For many simple projects, it does work. > > You *could* also ask on the PythonMac SIG list. > > https://mail.python.org/mailman/listinfo/pythonmac-sig > > -- > Ned Deily, > nad@acm.org > > -- > https://mail.python.org/mailman/listinfo/python-list