[jpy] 06/13: Revert to use default jvm

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Jun 21 08:15:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch master
in repository jpy.

commit e194d5090092118b49064f0cbb99a85ff95f5977
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Mar 14 16:54:38 2016 +0000

    Revert to use default jvm
---
 debian/patches/default_jvm.patch | 41 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 2 files changed, 42 insertions(+)

diff --git a/debian/patches/default_jvm.patch b/debian/patches/default_jvm.patch
new file mode 100644
index 0000000..11a2452
--- /dev/null
+++ b/debian/patches/default_jvm.patch
@@ -0,0 +1,41 @@
+Index: python-jpype-0.5.4.2/src/python/jpype/_linux.py
+===================================================================
+--- python-jpype-0.5.4.2.orig/src/python/jpype/_linux.py	2013-05-15 13:18:27.704339655 +0900
++++ python-jpype-0.5.4.2/src/python/jpype/_linux.py	2013-05-15 13:23:59.229960405 +0900
+@@ -17,7 +17,8 @@
+ 
+ import os, re
+ 
+-
++import subprocess
++dpkg_arch = subprocess.check_output(['dpkg', '--print-architecture']).strip()
+ 
+ _KNOWN_LOCATIONS = [
+     ("/opt/sun/", re.compile(r"j2sdk(.+)/jre/lib/i386/client/libjvm.so") ),
+@@ -26,12 +27,9 @@
+ ]
+ 
+ JRE_ARCHS = [
+-			 "amd64/server/libjvm.so",
+-			 "i386/client/libjvm.so",
+-			 "i386/server/libjvm.so",
++			 "%s/server/libjvm.so" % dpkg_arch,
+ 			 ]
+ 
+-
+ def getDefaultJVMPath() :
+     jvm = _getJVMFromJavaHome()
+     if jvm is not None :
+@@ -47,10 +45,10 @@
+         # TODO
+         pass
+ 
+-    return "/usr/java/jre1.5.0_05/lib/i386/client/libjvm.so"
++    return "/usr/lib/jvm/default-java/jre/lib/%s/server/libjvm.so" % dpkg_arch
+         
+ def _getJVMFromJavaHome():
+-	java_home = os.getenv("JAVA_HOME")
++	java_home = os.getenv("JAVA_HOME", '')
+ 	rootJre = None
+ 	if os.path.exists(java_home+"/bin/javac") :
+ 		# this is a JDK home
diff --git a/debian/patches/series b/debian/patches/series
index 5503cdb..c7d138a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 no-ez_setup.patch
+default_jvm.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/jpy.git



More information about the debian-science-commits mailing list