How to use the new python portgroup (was: Re: [84109] trunk/dports/python)
Ryan Schmidt
ryandesign at macports.org
Mon Sep 19 01:09:16 PDT 2011
Andrew,
It's ok, the subport stuff is still strange to me too, and it's not documented, except if you read the macports-dev mailing list closely. Here's what I've been able to figure out. I'll send this to the list too since others may want to know too.
On Sep 17, 2011, at 11:50, Andrew Fernandes wrote:
> Heh - sorry for the cryptic "it doesn't work" message...
>
> I have a bugger of a time using the new python portgroup. I get errors like, when building "py-foo", I get and error stating that "py-foo" is a required dependency, and things like that.
That sounds odd, but remember that under the unified python portgroup, py-foo would be a stub port; you're not meant to install it. If you want the python X.Y version of foo, you'd install pyXY-foo. Unlike previously with the old portgroups, that also goes for python 2.4 now, so it would be py24-foo. Of course in your portfile you haven't listed 2.4 as a compatible version, so py24-foo wouldn't be available anyway.
> With the attached port (and I double-checked that it is in the "python/py-pylibelf" directory, I have strange behaviour. The first time I started to build it, I had a TCL error that I could not decipher. More accurately, I could "port build" it and it was okay. "port destroot" died with a TCL error.
>
> I can't reproduce that error at all now, so unfortunately can't be more specific.
>
> Now, with the attached portfile, it passes "port lint", fetches and patches... but build and destroot all are "empty" phases that don't do anything. Which is a different error than I had, above.
I tried installing py-pylibelf (by downloading the portfile you attached to your email, cd'ing to the directory it's in and running "sudo port install") and it began to build py27-pylibelf, which is what it should do, since you specified that 2.7 is the default version
> Strange, strange, strange. Am I doing something fundamentally wrong with the python portgroup?
>
> I seem to be doing something fundamentally wrong. It used to be I could create a dir, make a portfile in that dir, and hack away right up to destroot.
>
> Now, with the python portgroup, I honestly can't even figure out how to build a desired subport. I know this sounds like an idiotic question... but for py-foo with the python portgroup, when it IS NOT par of a portindex, how do you specify that you want py27-foo?
sudo port install subport=py27-foo
> Sorry if the frustration is leaking out. I really hope that you aren't going to just say "gee - there's a big FAQ on this that's the first hit on google..."... :-) I did google it, but came up empty... :-)
jmr just wrote some documentation in another reply that may be helpful to you:
http://lists.macosforge.org/pipermail/macports-dev/2011-September/016189.html
More information about the macports-dev
mailing list