From eaa7b651ebb51792885d94b793ff9c61b9a7cc51 Mon Sep 17 00:00:00 2001 From: Massimo DiPierro Date: Sat, 3 Dec 2011 01:04:18 -0600 Subject: [PATCH] fixed a problem with pypy detection --- VERSION | 2 +- gluon/compileapp.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 9415fb58..8da629ee 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.3 (2011-12-03 00:35:14) dev +Version 1.99.3 (2011-12-03 01:04:16) dev diff --git a/gluon/compileapp.py b/gluon/compileapp.py index 8f05e175..8210e81e 100644 --- a/gluon/compileapp.py +++ b/gluon/compileapp.py @@ -47,7 +47,8 @@ try: except: logger.warning('unable to import py_compile') -is_pypy = True if platform.python_implementation() == 'PyPy' else False +is_pypy = hasattr(platform,'python_implementation') and \ + platform.python_implementation() == 'PyPy' settings.global_settings.is_pypy = is_pypy is_gae = settings.global_settings.web2py_runtime_gae is_jython = settings.global_settings.is_jython = 'java' in sys.platform.lower() or hasattr(sys, 'JYTHON_JAR') or str(sys.copyright).find('Jython') > 0