Commit 97a6cca3 authored by Michael Büsch's avatar Michael Büsch

Add basic Jython checks

Signed-off-by: Michael Büsch's avatarMichael Buesch <m@bues.ch>
parent f1650e74
__pycache__/
*.pyc
*.pyo
*$py.class
build/
dist/
awlsim_cython
MANIFEST
*.swp
__pycache__/
*.pyc
*.pyo
......@@ -23,10 +23,21 @@ from __future__ import division, absolute_import, print_function, unicode_litera
from awlsim.core.compat import *
import sys
import os
# isPyPy is True, if the interpreter is PyPy.
isPyPy = "PyPy" in sys.version
isPyPy = "PyPy" in sys.version or\
"pypy" in os.path.basename(sys.executable)
# isJython is True, if the interpreter is Jython.
try:
import java as __javaModule
except ImportError as e:
__javaModule = None
isJython = "OpenJDK" in sys.version or\
"jython" in os.path.basename(sys.executable) or\
__javaModule is not None
# isPy3Compat is True, if the interpreter is Python 3 compatible.
isPy3Compat = sys.version_info[0] == 3
......
......@@ -26,9 +26,9 @@ import sys
from awlsim.core import *
import awlsim.cython_helper
if isPyPy:
# PySide does not work on PyPy, yet.
printError("Running awlsimgui on the PyPy interpreter is not supported.")
if isPyPy or isJython:
# PySide does not work on PyPy or Jython, yet.
printError("Running awlsimgui on the PyPy or Jython interpreter is not supported.")
printError("Please use CPython 2.7 or CPython 3.x")
sys.exit(1)
......
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