Commits

Arfrever Frehtes Taifersar Arahesis committed 12849ea

Disable workaround for Jython scripts on Linux systems.

  • Participants
  • Parent commits 41d492f

Comments (0)

Files changed (3)

 
 * Fix 2 errors with Jython 2.5.
 * Fix 1 failure with Jython 2.5 and 2.7.
+* Disable workaround for Jython scripts on Linux systems.
 
 ------
 0.6.32

File setuptools/command/easy_install.py

 
 def fix_jython_executable(executable, options):
     if sys.platform.startswith('java') and is_sh(executable):
+        # Workaround for Jython is not needed on Linux systems.
+        import java
+        if java.lang.System.getProperty("os.name") == "Linux":
+            return executable
+
         # Workaround Jython's sys.executable being a .sh (an invalid
         # shebang line interpreter)
         if options:

File setuptools/tests/test_resources.py

         if (sys.version_info >= (3,) and os.environ.get("LC_CTYPE")
             in (None, "C", "POSIX")):
             return
+
+        class java:
+            class lang:
+                class System:
+                    @staticmethod
+                    def getProperty(property):
+                        return ""
+        sys.modules["java"] = java
+
         platform = sys.platform
         sys.platform = 'java1.5.0_13'
         stdout = sys.stdout
                              '#!%s -x\n' % self.non_ascii_exe)
             self.assertTrue('Unable to adapt shebang line' in sys.stdout.getvalue())
         finally:
+            del sys.modules["java"]
             sys.platform = platform
             sys.stdout = stdout