Python portgroup
Mike Savory
msavory1 at nzbox.com
Sun Sep 18 22:18:08 PDT 2011
Thanks Josh
So when you say the port group has some comments, do you mean this?
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/group/python-1.0.tcl
The original port that I am really interested in is called scapy and it depends on python 2.5, there is also a py26-scapy that runs on python 2.6 (this also needs upgrading to the latest scapy version 2.2.0 )
http://www.secdev.org/projects/scapy/
$ port search scapy
py26-scapy @2.1.0 (net, security, python)
A powerful packet manipulation tool
scapy @2.0.1 (net, security, python)
A powerful packet manipulation tool
So rather than making a py27-scapy it looks like I should make a py-scapy that replaces scapy and incorporates py26-scapy
Does that seem to be the most sensible path?
As for replacing the pcap python library
$ port search libpcap
libpcap @1.1.1 (net)
Packet Capture library
py-pcapy @0.10.5 (python, net)
python interface to libpcap
py-pylibpcap @0.6.2 (python, net)
Python module for the libpcap packet capture library
py25-pcapy @0.10.5 (python, net)
python interface to libpcap
py25-pylibpcap @0.6.2 (python, net)
Python module for the libpcap packet capture library
py26-pcapy @0.10.5 (python, net)
python interface to libpcap
py26-pylibpcap @0.6.2 (python, net)
Python module for the libpcap packet capture library
py27-pylibpcap @0.6.2 (python, net)
Python module for the libpcap packet capture library
It seems like pcapy is an older version and that a new universal group for py-pylibpcap they uses the 0.6.2 build across all the python options should be the path forward.
Mike
On Sep 18, 2011, at 8:46 PM, Joshua Root wrote:
> 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