diff -Nru jpy-0.8/debian/changelog jpy-0.8/debian/changelog --- jpy-0.8/debian/changelog 2016-07-06 12:08:54.000000000 +0000 +++ jpy-0.8/debian/changelog 2016-07-07 08:43:08.000000000 +0000 @@ -1,9 +1,15 @@ +jpy (0.8-4) unstable; urgency=medium + + * Adapt patch to detect more archs correctly + + -- Alastair McKinstry Thu, 07 Jul 2016 09:15:00 +0100 + jpy (0.8-3) unstable; urgency=medium * Remove hard-coded amd64/i386 arch for JVM search. Use `dpkg --print-architecture` - -- Alastair McKinstry Wed, 06 Jul 2016 10:40:14 +0100 + -- Alastair McKinstry Thu, 07 Jul 2016 09:14:41 +0100 jpy (0.8-2) unstable; urgency=medium diff -Nru jpy-0.8/debian/patches/default_jvm.patch jpy-0.8/debian/patches/default_jvm.patch --- jpy-0.8/debian/patches/default_jvm.patch 2016-07-06 12:08:54.000000000 +0000 +++ jpy-0.8/debian/patches/default_jvm.patch 2016-07-07 08:43:08.000000000 +0000 @@ -21,7 +21,7 @@ def _get_jvm_lib_dirs(java_home_dir): - arch = 'amd64' if PYTHON_64BIT else 'i386' + # arch = 'amd64' if PYTHON_64BIT else 'i386' -+ arch = subprocess.check_output(['dpkg', '--print-architecture']).strip() ++ arch = subprocess.check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip() return (os.path.join(java_home_dir, 'bin'), os.path.join(java_home_dir, 'bin', 'server'), os.path.join(java_home_dir, 'bin', 'client'), @@ -29,8 +29,8 @@ search_dirs += _get_jvm_lib_dirs(jre_home_dir) search_dirs += _get_jvm_lib_dirs(java_home_dir) -+ dpkg_arch = subprocess.check_output(['dpkg', '--print-architecture']).strip() -+ search_dirs += "/usr/lib/jvm/default-java/jre/lib/%s/server" % dpkg_arch ++ arch = subprocess.check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip() ++ search_dirs += "/usr/lib/jvm/default-java/jre/lib/%s/server" % arch + search_dirs = _add_paths_if_exists([], *search_dirs) diff -Nru jpy-0.8/debian/patches/python3.patch jpy-0.8/debian/patches/python3.patch --- jpy-0.8/debian/patches/python3.patch 2016-07-06 12:08:54.000000000 +0000 +++ jpy-0.8/debian/patches/python3.patch 2016-07-07 08:44:48.000000000 +0000 @@ -16,29 +16,30 @@ # Uncomment for debugging # logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) -@@ -158,7 +158,9 @@ def find_jvm_dll_file(java_home_dir=None +@@ -157,8 +157,9 @@ def find_jvm_dll_file(java_home_dir=None + def _get_jvm_lib_dirs(java_home_dir): - # arch = 'amd64' if PYTHON_64BIT else 'i386' -- arch = subprocess.check_output(['dpkg', '--print-architecture']).strip() -+ arch = check_output(['dpkg', '--print-architecture']).strip() -+ if type(arch) != str: +- # arch = 'amd64' if PYTHON_64BIT else 'i386' +- arch = subprocess.check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip() ++ arch = check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip() ++ if type(arch) != str: # python3 + arch = arch.decode('utf-8') return (os.path.join(java_home_dir, 'bin'), os.path.join(java_home_dir, 'bin', 'server'), os.path.join(java_home_dir, 'bin', 'client'), -@@ -195,7 +197,9 @@ def _find_jvm_dll_file(java_home_dir): +@@ -195,7 +196,9 @@ def _find_jvm_dll_file(java_home_dir): search_dirs += _get_jvm_lib_dirs(jre_home_dir) search_dirs += _get_jvm_lib_dirs(java_home_dir) -- dpkg_arch = subprocess.check_output(['dpkg', '--print-architecture']).strip() -+ dpkg_arch = check_output(['dpkg', '--print-architecture']).strip() -+ if type(dpkg_arch) != str: # Python3 -+ dpkg_arch = dpkg_arch.decode('utf-8') - search_dirs += "/usr/lib/jvm/default-java/jre/lib/%s/server" % dpkg_arch +- arch = subprocess.check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip() ++ arch = check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip() ++ if type(arch) != str: # python3 ++ arch = arch.decode('utf-8') + search_dirs += "/usr/lib/jvm/default-java/jre/lib/%s/server" % arch search_dirs = _add_paths_if_exists([], *search_dirs) -@@ -436,7 +440,7 @@ class Config: +@@ -436,7 +439,7 @@ class Config: class Properties: def __init__(self, values=None): if values: