Visualized MacPorts Ports

Arno Hautala arno at alum.wpi.edu
Wed Jul 3 18:25:11 PDT 2013


You might also look at this:
http://www.puredarwin.org/developers/macports/macports-dependencies-overview

On Wed, Jul 3, 2013 at 12:45 PM, Rainer Müller <raimue at macports.org> wrote:
> On 2013-07-03 18:16, Jean-François Caron wrote:
>> I'm wondering if there is a MacPorts equivalent to the python-apt
>> package, for getting MacPorts information directly within python.  Or
>> otherwise a good way to access the MacPorts list of ports,
>> dependencies, and categories from Python.
>
> There is no API for Python. However, you can query the information
> straight-forward with the port tool.
>
> List of all available ports:
>   port -q echo all
>
> List of all dependencies of a specific port:
>   port -q echo depof:$NAME
>
> There is no such thing as suggest/recommends in MacPorts, but it still
> has different kinds of dependencies. On the one hand there are
> depends_fetch, depends_extract and depends_build, that are only required
> for building the port. On the other hand there are depends_lib and
> depends_run which are required at runtime. The command above using
> depof: includes all of them.
>
> I guess it's more interesting to see runtime dependencies for such a
> graph, but you could also add both build and runtime dependencies with a
> different weight as in the graph for Ubuntu. Anyway, we should
> distinguish between these two types of dependencies.
>
> Retrieving only the runtime dependencies of a specific port in a nice
> line-wise format proves to be a lot harder:
>
> port -q info --depends_lib --depends_run $NAME |tr ',' '\n' |awk -F: 'NF
>> 0 {print $NF}'
>
> I hope that helps you to get started for a similar project. In case you
> need more assistance with the port command, just ask :-)
>
> Rainer
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-users



-- 
arno  s  hautala    /-|   arno at alum.wpi.edu

pgp b2c9d448


More information about the macports-users mailing list