Questions on dependencies

Blair Zajac blair at orcaware.com
Thu Oct 31 12:08:20 PDT 2013


On 10/31/13 11:54 AM, Peter Danecek wrote:
>
> Hi all,
>
> I'm somewhat puzzled with the dependencies of some ports, and I realise the I lack some basic understanding.
>
> (1) py-cython
>
>  From what I understand, build dependencies are required during the build, but can be removed later. Also they are not required for installation of prebuilt packages. But I have no clear idea if `py-cython` is a build dependency or a lib dependency. Looking through the existing ports, I find both.

We use Cython for an internal app but I've only seen it used as a build 
dependency.  It could be that other ports could switch.  If you're working on a 
new port, try making it a build dependency and switching to a lib if its needed 
at runtime.

> Is `py??-cython` required after the build?
>
> (2) python package dependencies
>
> Intuitively, I would say that most python package dependencies were lib dependencies. But they actually may install without, right? So is it okay to declare them lib dependencies or might it be better to make them runtime dependencies?

lib is a runtime dependency.

>
> (3) What exactly makes a lib a dependency in Macports?
>
> I have the situation that some software depend on some library, its headers are included it is linked against it. Okay, here the situation is clear. But this lib may again depend on other libs, but my software does not directly reference/call these libraries. (It may need to link against it, not completely clear to me). Is this library a dependency for Macports or would I rely on the fact, that the library I am referencing directly, would have these other libraries as dependencies?

MacPorts can support transitive dependencies (that is, not listing the 
dependencies of your dependencies), but in practice we commonly list those 
dependencies if they are picked up at build time by port.  The reason to do this 
is to ensure the transitive dependency is not removed if the intermediate 
dependency is removed.

Regards,
Blair



More information about the macports-dev mailing list