PortGroups / New to Port File Development, Sorry!
Joshua Root
jmr at macports.org
Sun Aug 26 02:26:52 PDT 2012
On 2012-8-26 08:22 , Ben Smith wrote:
> I have two python apps (I'm saying apps instead of scripts because
> each contains multiple files -- I'm not sure if that's going to cause
> a problem yet either), that run on the command line: HeapCL and
> TorchCL. The concept/implementation is very close to GoogleCL. These
> are command line tools that talk to a couple of WebApps (a CRM and
> project management tool) and allow you to manipulate the API from the
> command line.
>
> So, what they are, in terms of files is one file (called HeapCL or
> TorchCL) that is a python script and has a kind of unix executable
> file, also in the same directory as the executable file is a bunch of
> files and directories (still all python) that is used to support the
> executable file. As I said, almost exactly like GoogleCL.
>
>>From reading over everything in the port development, it looks like I
> need to be using the python portGroup. But also from reading over
> everything, it seems to be me that I need to get rid of some of the
> phases. But I'm assuming the python port group gets rid of those for
> me (but I don't want to assume).
The relevant docs are here:
<http://guide.macports.org/chunked/reference.portgroup.html#reference.portgroup.python.sugar>
The 'use_configure no' default set by the portgroup means the configure
phase will be skipped.
> Another question is does the python portgroup call a setup.py file of
> any kind (looking at GoogleCL's port file it appears it might)? If
> so, can I get rid of that stage. And finally, what happens to the
> files in the directory? Do they just get copied in the same directory
> as they should or do I have a problem there?
Yes, as indicated by the build.cmd default value, setup.py is used. You
can change that as usual, or override or eliminate the phase entirely as
per
<http://guide.macports.org/chunked/development.examples.html#development.examples.override>.
I'm not sure what you mean by "the directory" in your second-last
question, but any files that should be installed need to be placed in
the appropriate directory structure under the path in the ${destroot}
variable, during the destroot phase.
The ultimate authority for what any portgroup does is of course the
source, which can be found under _resources/port1.0/group in the ports tree.
- Josh
More information about the macports-dev
mailing list