[issue23970] Update distutils.msvccompiler for VC14

Marc-Andre Lemburg report at bugs.python.org
Fri Apr 17 10:29:38 CEST 2015


Marc-Andre Lemburg added the comment:

On 17.04.2015 00:06, Steve Dower wrote:
> 
> So it looks like what I should do is use the include_dirs and library_dirs members from CCompiler so they can be set through other properties.

I see that you're basically reading the include and lib
dirs from the vc_env which essentially reads the vcvars
batch files, so that's no different than what we're
already doing.

It may be useful to add an official helper to the module to
run this extraction outside the compiler class, e.g.

def get_vc_var(var):
    return _get_vc_env(plat_spec).get(var)

> The extra arguments are passed into compile() as extra_preargs and extra_postargs, though I'm not entirely sure where they come from. I'd rather figure out how to use those than invent a new way of specifying them (FWIW, they've always been supported by the various msvccompiler implementations).

Hmm, to hook into those, we'd have to find every single use of those
methods and override them. Doesn't sound like a good way to do this,
if you want a few options extra with every single compile call.

I guess we'll then just continue to override the .initialize() call.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23970>
_______________________________________


More information about the Python-bugs-list mailing list