« Ratpoison titlechanged hook | Main | CPAN handling »

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()
# other assignments to metadata
setup(**metadata)

so I just used pprint to look at options:

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

I saw that the unwanted compiler options were coming from options['extra_compile_args'] 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.)

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)