[Distutils] The role and functionality of customize_compiler
Poor Yorick
org.python.distutils-sig at pooryorick.com
Fri Jun 5 18:00:01 CEST 2015
It looks like the defaults for ccompiler.executables that are set in
compiler-specific sublcasses like UnixCCompiler are always overridden by
customize_compiler in sysconfig.py. For example, in UnixCcompiler the value
for executables['compiler'] is ["cc"], but this will never be used because
comtomize_compiler invariably grabs the compiler value out of the Python
Makefile and uses that. Should customize_compiler be reorganized a bit so that
defaults are actually used if customize_compiler comes up empty-handed for
certain values?
Next, it looks like customize_compiler is really a method of UnixCcompiler
disguised as an independent function. Would it make sense for Ccompiler to
have an abstract method, "customize", and to move the current
customize_compiler function into UnixCcompiler?
On the topic of include directories, would it make sense to add a
"sysinclude_dirs" option to the Extension class in order separate out the two
different uses that include_dirs currently plays in setup.py scripts?
--
Yorick
More information about the Distutils-SIG
mailing list