[New-bugs-announce] [issue12242] distutils2 environment marker for current compiler

Eli Collins report at bugs.python.org
Thu Jun 2 17:28:43 CEST 2011

New submission from Eli Collins <elic at assurancetechnologies.com>:

It would be useful to have an environment marker which matched the compiler being used when compiling a C extension. 

Sometimes different compilers require different options (different lib names, different flags, etc); distutils1 setup.py files which have to deal with this currently go through some convolutions to determine the current compiler, and then dynamically modify extra_compile_args before handing them off to setup. 

Since packaging is moving to a setup.cfg file, it would be useful to be able to use an environment marker along the lines of  'extra_compile_args = -Dmingw_specific_flag ; packaging.c_compiler == "mingw"', allowing for special options for mingw vs msvc, etc. 

Since issue 11921 made it sound like environment markers had been expanded to the extensions sections, I'm hoping this isn't too complicated (but don't know the codebase well enough to write a patch myself).

assignee: tarek
components: Distutils2
messages: 137481
nosy: alexis, eli.collins, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: distutils2 environment marker for current compiler
type: feature request

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list