File: debian-java-version.patch

package info (click to toggle)
python-jpype 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,308 kB
  • sloc: python: 19,275; cpp: 18,053; java: 8,638; xml: 1,454; makefile: 155; sh: 37
file content (20 lines) | stat: -rw-r--r-- 842 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From: Colin Watson <cjwatson@debian.org>
Date: Wed, 3 Sep 2025 20:18:27 +0100
Subject: Handle Debian's OpenJDK version numbers

Last-Update: 2025-09-03
---
 test/jpypetest/common.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test/jpypetest/common.py b/test/jpypetest/common.py
index 8494ff5..6f879b9 100644
--- a/test/jpypetest/common.py
+++ b/test/jpypetest/common.py
@@ -162,5 +162,4 @@ def java_version():
                           "import jpype; jpype.startJVM(); "
                           "print(jpype.java.lang.System.getProperty('java.version'))"]),
                        encoding='ascii')
-    # todo: make this robust for version "numbers" containing strings (e.g.) 22.1-internal
-    return tuple(map(int, java_version.split(".")))
+    return tuple(map(int, java_version.split("-")[0].split(".")))