unable to install under Jython - fix included!

Issue #58 resolved
ppolewicz
created an issue

This is a re-occurrence of http://pyyaml.org/ticket/163
It was going to be fixed by http://pyyaml.org/changeset/376 but the patch and current source check sys.version, which doesn't necessarily need to contain "Java" if running Jython:

>>> sys.version
'2.7.1b2 (default:315435b90915, Oct 12 2015, 03:47:10) \n[OpenJDK 64-Bit Server VM (Oracle Corporation)]'

As far as I know, the right way is to check it like this:

>>> import platform
>>> platform.system()
'Java'

so setup.py line ~124 from current form:

    def ext_status(self, ext):
        if 'Java' in sys.version or 'IronPython' in sys.version or 'PyPy' in sys.version:
            return False

should be changed into:

    def ext_status(self, ext):
        if platform.system() == 'Java' or 'IronPython' in sys.version or 'PyPy' in sys.version:
            return False

and import platform should be added at the top of the file.

Comments (1)

  1. Log in to comment