Skip to content
This repository
Browse code

trying to make java home detection on linux better.

  • Loading branch information...
commit f5431b3bc1f542e71ec6a2e465de00bd08728ac2 1 parent d3188ff
Luis Nell authored July 31, 2012

Showing 1 changed file with 9 additions and 2 deletions. Show diff stats Hide diff stats

  1. 11  setup.py
11  setup.py
@@ -62,8 +62,15 @@ def setupMacOSX(self):
62 62
     def setupLinux(self):
63 63
         self.javaHome = os.getenv("JAVA_HOME")
64 64
         if self.javaHome is None:
65  
-            self.javaHome = '/usr/lib/jvm/java-1.5.0-sun-1.5.0.08'  # Ubuntu linux
66  
-            #self.javaHome = '/usr/java/jdk1.5.0_05'
  65
+            possibleHomes = ['/usr/lib/jvm/default-java'
  66
+                             '/usr/lib/jvm/java-1.5.0-gcj-4.4',
  67
+                             '/usr/lib/jvm/jdk1.6.0_30',
  68
+                             '/usr/lib/jvm/java-1.5.0-sun-1.5.0.08',
  69
+                             '/usr/java/jdk1.5.0_05']
  70
+            for home in possibleHomes:
  71
+                if os.path.exists(home):
  72
+                    self.javaHome = home
  73
+                    break
67 74
         self.jdkInclude = "linux"
68 75
         self.libraries = ["dl"]
69 76
         self.libraryDir = [self.javaHome + "/lib"]

0 notes on commit f5431b3

Please sign in to comment.
Something went wrong with that request. Please try again.