diff options
Diffstat (limited to 'devscripts')
| -rw-r--r-- | devscripts/make_lazy_extractors.py | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py index 1a841a08b..dee9d6d91 100644 --- a/devscripts/make_lazy_extractors.py +++ b/devscripts/make_lazy_extractors.py @@ -118,3 +118,14 @@ module_src = '\n'.join(module_contents) + '\n'  with io.open(lazy_extractors_filename, 'wt', encoding='utf-8') as f:      f.write(module_src) + +# work around JVM byte code module limit in Jython +if sys.platform.startswith('java') and sys.version_info[:2] == (2, 7): +    import subprocess +    from youtube_dl.compat import compat_subprocess_get_DEVNULL +    # if Python 2.7 is available, use it to compile the module for Jython +    try: +        # if Python 2.7 is available, use it to compile the module for Jython +        subprocess.check_call(['python2.7', '-m', 'py_compile', lazy_extractors_filename], stdout=compat_subprocess_get_DEVNULL()) +    except Exception: +        pass | 
