Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Mar 2016 13:17:21 -0500
From:      Chris Inacio <nacho319@gmail.com>
To:        Shane Ambler <FreeBSD@shaneware.biz>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: library porting question - optional python bindings
Message-ID:  <CAG_PEexb5fZ3Pc2n0_0yAvUdRK5yp%2BsP1apAs=8pyBbhXO8z0Q@mail.gmail.com>
In-Reply-To: <56D7E5C5.6020207@ShaneWare.Biz>
References:  <CAG_PEeyLw_VS=pL-3J6NZycx9-b_qo9GRaxoeV34i5gq_Cx=bg@mail.gmail.com> <56D54D11.2050502@ShaneWare.Biz> <CAG_PEeyiQBzVth8eW41LX94dq%2BxswO%2Bp3YR5o9_evUrraFFNyA@mail.gmail.com> <56D7E5C5.6020207@ShaneWare.Biz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 3, 2016 at 2:20 AM, Shane Ambler <FreeBSD@shaneware.biz> wrote:

> On 03/03/2016 03:03, Chris Inacio wrote:
>
>> On Tue, Mar 1, 2016 at 3:04 AM, Shane Ambler <FreeBSD@shaneware.biz>
>> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG_PEexb5fZ3Pc2n0_0yAvUdRK5yp%2BsP1apAs=8pyBbhXO8z0Q>