Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: wrappers for C/C++ Date: Sat, 12 Dec 2015 05:29:08 +1100 Lines: 21 Message-ID: References: <6C6EE445A6F6CE4E8A0FFB51B071A4E2D869B96D@AMERMBX02.PERKINELMER.NET> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de fB6zRPQNtLr+1Tzz2w8oCwM4I9S385Z1J1kRNDiO4Xeg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'binary': 0.05; 'wrapper': 0.07; 'cc:addr:python-list': 0.09; 'c/c++': 0.09; 'inherited': 0.09; 'python': 0.10; '2.7': 0.13; '3.2.': 0.16; 'binary.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrappers': 0.16; 'wrote:': 0.16; 'project,': 0.18; 'versions': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'libraries': 0.22; 'noted': 0.22; 'am,': 0.23; 'code.': 0.23; '(or': 0.23; '(you': 0.23; 'dec': 0.23; "python's": 0.23; 'sat,': 0.23; "haven't": 0.24; 'unix': 0.24; 'header:In-Reply-To:1': 0.24; 'supported': 0.27; 'separate': 0.27; 'message-id:@mail.gmail.com': 0.27; '3.1': 0.29; 'for,': 0.29; "i'm": 0.30; 'subject:/': 0.30; 'work.': 0.30; 'code': 0.30; 'probably': 0.31; 'posting': 0.32; 'maybe': 0.33; 'source': 0.33; 'builds': 0.33; 'received:google.com': 0.35; 'could': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'possible': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'being': 0.37; '12,': 0.37; 'version': 0.38; 'received:209': 0.38; 'building': 0.38; 'mean': 0.38; 'sure': 0.39; 'build': 0.40; 'still': 0.40; 'some': 0.40; 'save': 0.60; 'your': 0.60; 'our': 0.64; 'yourself': 0.73; '3.6': 0.84; 'chrisa': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=1JBoTC85pgZWzf7Uy7e2CVFM6SWWCWFZAfVrbofz56U=; b=lqlKg8VfCN6O/EK0Jd6HNbcxXFqx9BGIxEx6qK9FsaJkcK9Yzptzl9j4r9D7G1U/7E QadfqnJulUgNRmUF/I5kbNN+cbChDtGPYGUwrJIlRCPy0T4pdSTGNycox/PAAm0Cldgy kWt6a7IXLusKreDxgDdsVZp9gJdAsWNRI0Sk3mKS1QbskHAuCA9HC6gVmoqV/HXPt/de pgfvILiMqgdjZGWh22H3nT/6sVZxcp0waF9tP0eDd9Xu+Yh/iqNuaDdEZtDvEOpSFQo0 3Ogp9rsEs5M9DHLWtJ4n1Vio8LEXaZoTUafyWt13cbBDqr+qcz2TtTl11KFjg/Zwl1OD TsPg== X-Received: by 10.107.163.146 with SMTP id m140mr3964961ioe.19.1449858548124; Fri, 11 Dec 2015 10:29:08 -0800 (PST) In-Reply-To: <6C6EE445A6F6CE4E8A0FFB51B071A4E2D869B96D@AMERMBX02.PERKINELMER.NET> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100287 On Sat, Dec 12, 2015 at 4:21 AM, Ginga, Dick wrote: > I have inherited a product build that uses SWIG to product wrapper libraries for our C/C++ code. It currently builds these wrappers for 2.5, 2.6, 3.1 and 3.2. > > Is it necessary to have version specific wrappers? Yes, it is, because of the way Python's internals work. But you can probably build them all from the same source code. I'm not sure whether you mean that those four are the _only_ versions it's building for, or if you noted them as being particularly old versions still being built for. Either way, you should be in full control of your version support; if this is an internal project, you could simply stipulate that only one version of Python is supported (or maybe two - 2.7 and one 3.x), and save yourself some build hassles. If you're posting it on PyPI, you can put the source code out there and let Unix users build their own, and then you need only worry about Windows; I haven't seen confirmation yet (as there's no official 3.6 builds), but supporting "3.5+" should be possible from a single binary. (You would still need a separate binary for 2.7, though.) ChrisA