Python portgroup
Joshua Root
jmr at macports.org
Sun Sep 18 20:46:46 PDT 2011
On 2011-9-19 13:20 , Mike Savory wrote:
> Hi All
>
> I have been looking at upgrading the following ports to work under Python 2.7
>
> py26-gnuplot
> py26-scapy
> py26-pylibpcap
>
> What is a good example of the new subport python implementation that will allow all these to be merged into the new architecture? This doesn't seem to be in the guide yet.
The portgroup has some comments covering basic usage.
> It also looks like py26-pylibpcap should be renamed to py26-libpcap as part of this process.
I see no reason why switching to the unified portgroup would require
that. If there are other reasons for the rename, it needs to be handled
as usual:
<http://guide.macports.org/chunked/development.practices.html#development.practices.rename-replace-port>
> Any pointers appreciated
Basically it goes:
1. Change name to something of the form py-foo.
2. Change PortGroup line to 'PortGroup python 1.0'.
3. Set the python.versions option, and if there was no previously
existing py-foo port for python24, also set python.default_version.
4. Wrap anything that wouldn't work in a stub port in 'if {$subport !=
$name} {}', because py-foo is a stub that just depends on the default
version. This includes but is not limited to depends_*, patchfiles, and
pre/post phase code.
5. Change uses of '$name' to '$subport' as appropriate (e.g. when
creating a doc dir).
- Josh
More information about the macports-dev
mailing list