Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r3129:68933f0ea99a Date: 2018-07-10 16:20 +0200 http://bitbucket.org/cffi/cffi/changeset/68933f0ea99a/
Log: setup.py now supports building in a context and installing in a different context with no compiler. You still get the error message about no compiler found, but now the error is not fatal. diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -46,6 +46,7 @@ # resultlist[:] = res +no_compiler_found = False def no_working_compiler_found(): sys.stderr.write(""" No working compiler found, or bogus compiler options passed to @@ -55,8 +56,13 @@ tries to compile C code. (Hints: on OS/X 10.8, for errors about -mno-fused-madd see http://stackoverflow.com/questions/22313407/ Otherwise, see https://wiki.python.org/moin/CompLangPython or - the IRC channel #python on irc.freenode.net.)\n""") - sys.exit(1) + the IRC channel #python on irc.freenode.net.) + + Trying to continue anyway. If you are trying to install CFFI from + a build done in a different context, you can ignore this warning. + \n""") + global no_compiler_found + no_compiler_found = True def get_config(): from distutils.core import Distribution @@ -75,11 +81,12 @@ ok1 = config.try_compile('int some_regular_variable_42;') if not ok1: no_working_compiler_found() - sys.stderr.write("Note: will not use '__thread' in the C code\n") - _safe_to_ignore() + else: + sys.stderr.write("Note: will not use '__thread' in the C code\n") + _safe_to_ignore() def ask_supports_sync_synchronize(): - if sys.platform == 'win32': + if sys.platform == 'win32' or no_compiler_found: return config = get_config() ok = config.try_link('int main(void) { __sync_synchronize(); return 0; }') _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit