> On Sep 9, 2016, at 3:06 PM, Ken Cunningham wrote:
>
>>
>> It's not *bad*, just not ideal. If the build system doesn't respect
>> PYTHON_EXECUTABLE, then upstream should fix that.
>
> True.
>
> As it turns out, I learned how to re-write the python to be compatible with
> 3.x, and fixed the port that way. So that's probably the best outcome, and
> I'll submit that upstream for them to fix someday.
That's good. But it still suggests that the port is building with whatever
"python" is, which as you've seen is different on different systems. Does the
code work with the very old version of python included on macOS Tiger? Will it
work with the version of python included with whatever version of macOS comes
after Sierra? You might not know. It might be better to pick a known good
version of python, add that as a dependency, and make the port use that. This
is not just a good idea but even required if the port were to do something like
install a python module (because that python module would be for that one
version of python), or needs python not just to build but to run (because it
would run that version of python).
> Although I'd still like to know how to adjust the $PATH, if you feel so
> inclined one day -- promise to use my powers for good and not for evil ...
I found a simple example of how to do this in the gupnp-igd port, which has
this block:
variant python27 description {Enable Python 2.7 bindings} {
configure.args-replace --disable-python --enable-python
depends_lib-append port:py27-gobject
configure.python ${prefix}/bin/python2.7
set python_prefix ${frameworks_dir}/Python.framework/Versions/2.7
set python_pkg_config_path ${python_prefix}/lib/pkgconfig
configure.pkg_config_path ${python_pkg_config_path}
build.env-append PATH=${python_prefix}/bin:$env(PATH)
}
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev