From owner-freebsd-ports@freebsd.org Thu Mar 3 18:17:22 2016 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 63B03A94F06 for ; Thu, 3 Mar 2016 18:17:22 +0000 (UTC) (envelope-from nacho319@gmail.com) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (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 2E4243B8 for ; Thu, 3 Mar 2016 18:17:22 +0000 (UTC) (envelope-from nacho319@gmail.com) Received: by mail-ig0-x22a.google.com with SMTP id i18so1006490igh.1 for ; Thu, 03 Mar 2016 10:17:22 -0800 (PST) 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:to :cc; bh=ZaRZFWLK11kI9xjVv5k6ZnUxV/48mvgqY9jPHF8fVXs=; b=igaMeZzMJYTET3PWdVqDYu9NgW3Ih+bIFoR3MHDzWZ21KhSAgqOy43HK0g21Qn+84e wVtd1oDWTrvgU3Ct1A6j6OZTf4By1vZGvCs6CGDS4Gn48uiv4zIowIaVxQwbAWFvhaz5 KpH7aMIf0qiEie3WrlE2F+RQ29U6y7g9HyAQLPZZlVl6pmPq+Y52k9NJze5sh0xTKqhw 2+1W9VkGTkFozvtsptGOsbDQR7owxGpLwu42vCB0s6a2cY0SreEyTF/gU8NhfhFf8ERp pws9z34DPS7Xx3mfmHSUVKu83E/Gj9A7maF4JNk3il3H2AYLarzABEJHYvqhK03tP0Lz +5qQ== 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:date :message-id:subject:from:to:cc; bh=ZaRZFWLK11kI9xjVv5k6ZnUxV/48mvgqY9jPHF8fVXs=; b=JKFrwCzEnh0RCkKGgjtIBc+yoDFa7VubtK4365Pth3pBumMsJBA3h29MnoPEHh1UND reIW6OwzI59P4eWWsEFFp7RBn80cpsiM9YCFJZALYe2Xp/ZWFNmyMsA4O5BlMXWM4FwD A6G/6FDp0mr1lZvZwE4t2bQzVMsB7GMdvN2DpvTxcRPsrMTxybFcWFFxueOXn7kLJCxD m/xrOXke+zGy0VHWnD3alcNJvNMpMKZkWklCFMGlwlmd/ImyVBva77riuWXOVh0YVOBo ZsJrxdZRb9evSR5/gH6D63SnQdNf/QY7zVJJBwIqK41GIMwehq70ENXdZjQPSANVKDfH GhwA== X-Gm-Message-State: AD7BkJLfMhY5sL6xF9aieiHDhGdDM9ofq0uIMBx+yV4CtZTsjKE2MIAEOyJkcgEnWCRVEwyNiYFQZZ1cyTNR5w== MIME-Version: 1.0 X-Received: by 10.50.60.34 with SMTP id e2mr453217igr.77.1457029041652; Thu, 03 Mar 2016 10:17:21 -0800 (PST) Received: by 10.36.118.15 with HTTP; Thu, 3 Mar 2016 10:17:21 -0800 (PST) In-Reply-To: <56D7E5C5.6020207@ShaneWare.Biz> References: <56D54D11.2050502@ShaneWare.Biz> <56D7E5C5.6020207@ShaneWare.Biz> Date: Thu, 3 Mar 2016 13:17:21 -0500 Message-ID: Subject: Re: library porting question - optional python bindings From: Chris Inacio To: Shane Ambler Cc: freebsd-ports@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2016 18:17:22 -0000 On Thu, Mar 3, 2016 at 2:20 AM, Shane Ambler wrote: > On 03/03/2016 03:03, Chris Inacio wrote: > >> On Tue, Mar 1, 2016 at 3:04 AM, Shane Ambler >> wrote: >> >> On 01/03/2016 13:08, Chris Inacio wrote: >>> >>> All, >>>> >>>> I'm trying to build a port definition for a library/application that can >>>> optionally include Python bindings. The library/application generally >>>> depends on other C libraries to exist (ZMQ v3, Protobufs-C) and if you >>>> enable Python support, then you need a Python interpreter plus >>>> Python-protobufs & python zmq. >>>> >>>> > >>> For a normal python module I would suggest making it as a separate port >>> that just installs the python module. This makes it easier to install >>> multiple versions for each python version. The py-module port can be a >>> slave of the main port so you don't have to maintain the same code >>> twice. >>> >>> > >>> The library is generally a C library with 3 "targets" a library (.so), >> header files (.h), and daemon that can be used as well. >> >> If you enable the optional Python support, then there is an entire python >> build area with the full "python setup.py ..." that gets run *from the C >> Makefile* when the Python dependencies are available. >> >> So yes, I can see that it makes sense to have this has 2 separate ports >> from a port maintenance point of view, but this is distributed as a single >> distribution. >> >> So you're suggesting 2 ports, from one source download, and 1 of those >> ports dependent on the other port? >> > > Yes you only need the one src tarball and distinfo between both ports. > You can also use the same pkg-descr and maybe the same pkg-plist. > > If the contents of the python port Makefile is kept to a minimum you > will only have to change the master port to update both, the changes to > the master port will apply to both ports. You can use conditionals to > get variations between building each port. > > The python module port only needs to depend on the master port if it > uses the libraries installed by it, which I'm expecting it would. > > > > -- > FreeBSD - the place to B...Software Developing > > Shane Ambler > > Thanks for the tips, truly helpful. I'm doing the slave port implementation.