Commit b8c5a192 authored by Jason Madden's avatar Jason Madden

Merge branch '32bit_build' of https://github.com/lanstin/gevent

parents aabda676 3ee02baf
#!/usr/bin/env python
"""gevent build & installation script"""
from __future__ import print_function
import sys
import os
......@@ -10,6 +8,10 @@ from os.path import join, abspath, basename, dirname
from subprocess import check_call
from glob import glob
import distutils
import distutils.sysconfig # to get CFLAGS to pass into c-ares configure script
PYPY = hasattr(sys, 'pypy_version_info')
try:
......@@ -64,9 +66,16 @@ libev_configure_command = ' '.join(["(cd ", _quoted_abspath('libev/'),
" && /bin/sh ./configure ",
" && mv config.h \"$OLDPWD\")",
'> configure-output.txt'])
_config_vars = distutils.sysconfig.get_config_var("CFLAGS")
if _config_vars and "m32" in _config_vars:
_m32 = 'CFLAGS="' + os.getenv('CFLAGS', '') + ' -m32"'
else:
_m32 = ''
ares_configure_command = ' '.join(["(cd ", _quoted_abspath('c-ares/'),
" && if [ -e ares_build.h ]; then cp ares_build.h ares_build.h.orig; fi ",
" && /bin/sh ./configure CONFIG_COMMANDS= CONFIG_FILES= ",
" && /bin/sh ./configure " + _m32 + "CONFIG_COMMANDS= CONFIG_FILES= ",
" && cp ares_config.h ares_build.h \"$OLDPWD\" ",
" && mv ares_build.h.orig ares_build.h)",
"> configure-output.txt"])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment