From 7bce2ad441b874e7a1cf8cc81059c5601d832697 Mon Sep 17 00:00:00 2001 From: dirkf Date: Thu, 20 Jul 2023 18:49:48 +0100 Subject: [build] Fix various Jython CI and test issues --- devscripts/make_lazy_extractors.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'devscripts') 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 -- cgit 1.4.1