I've been beating my head against this brick wall for a few days, and would
really like some pain relief ...
> -----Original Message-----
> From: Ken McDonell [mailto:kenj@xxxxxxxxxxxxxxxx]
> Sent: Wednesday, 2 March 2016 10:37 AM
> To: PCP <pcp@xxxxxxxxxxx>
> Subject: Yet another Python snarfoo
> ...
> On Mac OS X we've carefully moved PCP artifacts out of /usr to avoid
> installer issues ... this has be necessary on some of the *BSD
> platforms also, so this is not confined to Mac OS X (although that's
> where I'm battling with it at present).
> ...
> As a consequence ...
> ...
> 2. Because pcp(1) is not in /usr/bin on these platforms, none of the
> following will work in a fit:
>
> src/pmclient/pmclient_fg.python:#! /usr/bin/pcp python
> ...
The problem is worse than this ... on Mac OS X, shebang (#!) only works if the
next argument is an executable binary (and not a shell scripts like pcp(1)) ...
I have days of bloody evidence to support this claim.
When I eventually discovered this I wrote pmpython.c to run $PCP_PYTHON_PROG
from the env or pcp.conf and changed a couple of the Python scripts to use
#!/usr/bin/env pmpython
which demonstrably works.
Anyone see a problem with globally replacing the existing #!/usr/bin/pcp python
with the above for Python scripts in PCP?
|