From owner-freebsd-ports@freebsd.org Sat Dec 5 02:44:56 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 901B5A40631; Sat, 5 Dec 2015 02:44:56 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pf0-x22c.google.com (mail-pf0-x22c.google.com [IPv6:2607:f8b0:400e:c00::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 53D831BD0; Sat, 5 Dec 2015 02:44:56 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by pfu207 with SMTP id 207so34913953pfu.2; Fri, 04 Dec 2015 18:44:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=E+x7ecrKmRZo/nkJfZNVjh9woyHMp8kbq2oup6VKs8k=; b=SieOVepkvwddCDCh5qxt0gKCGOHrQ11m2Crrk6d3z6Jpkvn1XzFJh06JoGC08g4NTV 8q9om5ijeSGlgJrCWN1AIm+F8IWIaEqqI8HCrIAGBYSaeFJz7e+IsXWgu33Esz+Eu3S1 /C/eZu7tsU4zvCy3ogR1vwkNcLLGLk0kC7VR1MRdlo+0kKv/0RhBr+M2B9ONFm6atVrh XWDoUUP8paNrlWIdj7tJExAeVZBYOz/0D+ohFPlTuBS9NQ3lu5cSTNGz7q8km+C6AE+W 8ab3gjUDxLgRW5UE6la9f7TsDUFdfEy2tieMEl8/XrH6zypuOGF3yFTo64Onr8WwN0pn mDKg== X-Received: by 10.98.0.195 with SMTP id 186mr26410724pfa.130.1449283495440; Fri, 04 Dec 2015 18:44:55 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01::2? (2001-44b8-31ae-7b01-0000-0000-0000-0002.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01::2]) by smtp.gmail.com with ESMTPSA id 24sm19715824pfr.27.2015.12.04.18.44.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Dec 2015 18:44:54 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: Python and SWIG support in ports? References: To: Craig Rodrigues , ports , freebsd-python@freebsd.org From: Kubilay Kocak X-Enigmail-Draft-Status: N1110 Message-ID: <56624F9B.30508@FreeBSD.org> Date: Sat, 5 Dec 2015 13:44:43 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Thunderbird/42.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 02:44:56 -0000 On 5/12/2015 9:40 AM, Craig Rodrigues wrote: > Hi, > > I am working with the upstream maintainer of M2Crypto ( > https://gitlab.com/m2crypto/m2crypto ). > > In the distutils that comes with Python, the swig binary is harcoded > to "swig" if on a POSIX system: > > https://hg.python.org/cpython/file/v2.6.2/Lib/distutils/command/build_ext.py#l635 Short-term, swig20 could provide a symlink to the versioned binary until a 'more correct' and permanent fix can be made. I'm not sure what to do about those ports that depend on swig30 in the presence of swig20 also being installed, given they don't appear to CONFLICT_INSTALL on each other. They both can't provide the swig symlink. Supporting swig in DEFAULT_VERSIONS doesn't sound right and is probably overkill. > In our ports, we name our swig binaries things like > "/usr/local/bin/swig2.0" or > "/usr/local/bin/swig3.0". How do we deal with this in Python ports which > use > SWIG? If this is the case, it would mean all swig dependent things are also broken. How are other ports dealing with it, or working? This might provide some insight. The if os.name == "posix": branch could do the same swig version-suffixed binary checking that the elif os.name == "nt": condition branch does. A smarter way might *also* be to add functionality to that swig method to allow the system to provide the binary path/name via envvars or command line argument to (build,build_ext) commands explicitly. I suggest creating an upstream issue. > If possible, I'd like to push a fix upstream for FreeBSD, if the upstream > maintainer > is OK with it. Hit us up on IRC (#freebsd-python) if you'd like to talk more, or have questions > Thanks. > > -- > Craig