Unified Python portgroup

Freek Dijkstra software at macfreek.nl
Thu Jan 10 14:51:50 PST 2013


On 10-01-2013 15:25, Jeremy Lavergne wrote:

> You need:
> sudo port -d install subport=py27-pdfrw

Thanks Jeremy,

Your answer is spot-on. With this syntax, the modified Portgroup behaved
as it should.

I never made the mental link between "Unified portgroup" and "subport"
otherwise I would have probably found it on the mailing list (The guide
does not yet mention either of them).

A suggestion: Apparently, the Portgroup was clever enough to figure out
I have Python 2.7 installed. Would it be possible to improve the error
message to say:
>> Error: No subport specified. Did you mean 'port install
subport=py27-pdfrw'.
instead of the current:
>> Error: Dependency 'py27-pdfrw' not found.


On 10-01-2013 19:21, Ryan Schmidt wrote:

> Yes—provided you've already added the line "python.versions 27"
> (and possibly any other python versions you want to support, e.g.
> "python.versions 25 26 27").

I did, exactly that: "python.versions 25 26 27". To my surprise the
following command was accepted:

> [root at lampje] Code/macports/py-pdfrw# port install subport=py32-pdfrw
> --->  Computing dependencies for py32-pdfrw
> --->  Fetching archive for py32-pdfrw
> --->  Attempting to fetch py32-pdfrw-0.1_1.darwin_11.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/py32-pdfrw
> --->  Attempting to fetch py32-pdfrw-0.1_1.darwin_11.x86_64.tbz2 from http://lil.fr.packages.macports.org/py32-pdfrw
> --->  Attempting to fetch py32-pdfrw-0.1_1.darwin_11.x86_64.tbz2 from http://packages.macports.org/py32-pdfrw
> --->  Attempting to fetch py32-pdfrw-0.1_1.darwin_11.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/py32-pdfrw
> --->  Fetching distfiles for py32-pdfrw
> --->  Verifying checksum(s) for py32-pdfrw
> --->  Extracting py32-pdfrw
> --->  Configuring py32-pdfrw
> --->  Building py32-pdfrw
> --->  Staging py32-pdfrw into destroot
> --->  Installing py32-pdfrw @0.1_1
> --->  Activating py32-pdfrw @0.1_1
> --->  Cleaning py32-pdfrw

Is this intended? I suspect so, otherwise package owners still has to
update the package everytime a new Python versions is released. However,
in that case, I do not fully grasp what the purpose is of the line
"python.versions 25 26 27" -- it is neither used to pick the default
installer (I have to explicitly specify the subport), nor is it used to
enforce that installation only occurs for supported Python versions.

Thanks again,
Freek


More information about the macports-dev mailing list