[MacPorts] #53152: scons does not honor $PATH
MacPorts
noreply at macports.org
Sun Dec 25 04:16:43 CET 2016
#53152: scons does not honor $PATH
-----------------------+-----------------
Reporter: jeremyhu | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: scons |
-----------------------+-----------------
Comment (by jeremyhu):
http://scons.org/doc/1.2.0/HTML/scons-user/x1673.html
{{{
7.3.1. Propagating PATH From the External Environment
You may want to propagate the external PATH to the execution environment
for commands. You do this by initializing the PATH variable with the PATH
value from the os.environ dictionary, which is Python's way of letting you
get at the external environment:
import os
env = Environment(ENV = {'PATH' : os.environ['PATH']})
Alternatively, you may find it easier to just propagate the entire
external environment to the execution environment for commands. This is
simpler to code than explicity selecting the PATH value:
import os
env = Environment(ENV = os.environ)
Either of these will guarantee that SCons will be able to execute any
command that you can execute from the command line. The drawback is that
the build can behave differently if it's run by people with different PATH
values in their environment--for example, if both the /bin and
/usr/local/bin directories have different cc commands, then which one will
be used to compile programs will depend on which directory is listed first
in the user's PATH variable.
}}}
So... yet another completely braindead broken by design build system.
It's up to each project to decide that it should honor the build
environment?!?
--
Ticket URL: <https://trac.macports.org/ticket/53152#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list