about summary refs log tree commit diff
path: root/devscripts
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2023-07-20 18:49:48 +0100
committerdirkf <fieldhouse@gmx.net>2023-07-25 13:19:43 +0100
commit7bce2ad441b874e7a1cf8cc81059c5601d832697 (patch)
treec2632887b6251ad6a1aac76f6534972292f77533 /devscripts
parentca71e56c481c6d5ce69b4756f8f8c0aff97d79b5 (diff)
downloadyoutube-dl-7bce2ad441b874e7a1cf8cc81059c5601d832697.tar.gz
youtube-dl-7bce2ad441b874e7a1cf8cc81059c5601d832697.tar.xz
youtube-dl-7bce2ad441b874e7a1cf8cc81059c5601d832697.zip
[build] Fix various Jython CI and test issues
Diffstat (limited to 'devscripts')
-rw-r--r--devscripts/make_lazy_extractors.py11
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