[PATCH] build: allow some python variable overrides
gustavo at zacarias.com.ar
Tue Feb 4 03:17:00 MST 2014
On 02/03/2014 03:45 PM, Paul Kölle wrote:
> Hi Zacarias,
> I think the code could use some stylistic improvements if you dont mind ;)
Of course, it's welcome, my python-fu isn't great.
> Don't use bare except statements, this should probably be "except
> KeyError" but you might want to avoid all those try/except lines
> altogether. Why not use something like:
> os_env = dict(os.environ)
> if os_env.get('python_LDFLAGS', None):
> conf.log.write("python_LDFLAGS override from environment = %r\n" %
> python_LDFLAGS = override_python_LDFLAGS
True about the blind except.
There's a little problem there with your way... if i do...
python_LDFLAGS="" then it's assuming it's not overriding, when it is
(and there are valid use-cases for it being empty, in fact it works
better if left empty when cross-compiling and let python-config provide
it's stuff alone).
More information about the samba-technical