subport and dependency

Andrea D'Amore and.damore at macports.org
Sun Jan 22 00:48:15 PST 2012


On Sun, Jan 22, 2012 at 02:07, Ryan Schmidt <ryandesign at macports.org> wrote:

> the stub port doesn't install any software of its own and doesn't need any dependencies.

This I didn't know.

> That could be a reason. Or, the reason could be that you did not include 24 in this port's list of python.versions, and you left python.default_version at its default value of 24; if so, fix one or the other.

I removed 24 support at first as I thought py24-simplejson was broken,
then I realized the only the stub was broken as it was accessing
$python.version in post-destroot and that didn't exist in stub.

Anyway since python.default_version is 24 in unified portgroup I guess
it would have complain anyway, if I don't provide 24 subport I have to
specify a different python.default_version, is this correct?


> Also, you have this block in the port:
>    if {${python.version} != 24} {
>        depends_lib-append  port:py${python.version}-numpy
>    } else {
>        depends_lib-append  port:py-numpy
>    }
> This is wrong. It would be right if numpy weren't using the unified python portgroup. But because numpy is using the unified python portgroup, py-numpy isn't a real port; it's a stub port, and py24-numpy is the real python 2.4 port. So just always append dependency port:py${python.version}-numpy , regardless of the python version.

I took the very same code from r82241 [1] that is listed at 'Python'
wiki page's bottom as reference example [2].

On the opposite I had the impression that default stub should include
stub dependency, i.e. py-numpy rather than py24-numpy.
I preferer to specift the version as it doesn't assume knowing
anything about the dependency.


-- 
Andrea

[1] http://trac.macports.org/changeset/82241
[2] http://trac.macports.org/wiki/Python


More information about the macports-dev mailing list