Zed Lopez

Not an Ez_setup

I was trying to build a Python module yesterday, but

python setup.py build

insisted on including several compiler options that the compiler immediately balked at, returning an error. This is despite that the instance of Python I was using was freshly compiled with the same environment, so shouldn’t have any mistaken notions of how things should be built.

setup.py went:

if os.name == “posix”:
from setup_posix import get_config
else: # assume windows
from setup_windows import get_config

metadata, options = get_config()

  1. other assignments to metadata

so I just used pprint to look at options:

import pprint
pp = pprint.PrettyPrinter(indent=2)
metadata, options = get_config()

I saw that the unwanted compiler options were coming from

so I set that to the null list, and now I could build it.

Also, I got to find out that the 3 year old release version of mod_python 3.3.1 has a bug that causes compilation errors on some platforms (including mine, Solaris 2.10.)