From b0037b0631897f4fdd4553c19971601225ab3df5 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 24 Oct 2017 10:33:12 -0400 Subject: [PATCH] Add missing javac call. --- setup.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 630560a..2a672c0 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,10 @@ try: from setuptools import setup, Extension except ImportError: from distutils.core import setup, Extension +try: + import subprocess32 as subprocess +except ImportError: + import subprocess from os import environ from os.path import dirname, join, exists import sys @@ -69,7 +73,6 @@ if platform == 'android': libraries = ['sdl', 'log'] library_dirs = ['libs/' + getenv('ARCH')] elif platform == 'darwin': - import subprocess framework = subprocess.Popen( '/usr/libexec/java_home', stdout=subprocess.PIPE, shell=True).communicate()[0] @@ -89,7 +92,6 @@ elif platform == 'darwin': '{0}/include/darwin'.format(framework) ] else: - import subprocess # otherwise, we need to search the JDK_HOME jdk_home = getenv('JDK_HOME') if not jdk_home: @@ -167,6 +169,12 @@ with open(join('jnius', '__init__.py')) as fd: versionline = [x for x in fd.readlines() if x.startswith('__version__')] version = versionline[0].split("'")[-2] +# Compile NativeInvocationHandler.java +subprocess.check_call([ + 'javac', + join('jnius', 'src', 'org', 'jnius', 'NativeInvocationHandler.java') +]) + # create the extension setup( name='pyjnius',