aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2012-11-27 00:44:17 +0100
committerArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2012-11-27 00:44:17 +0100
commit11491404365ba925bb36935a9f7a14c1afe003cc (patch)
tree5ef291cac4a3db9a1c69c18c0adfc8915f563d13
parent753f783100cf598316e9030dcf59b24772819504 (diff)
downloadexternal_python_setuptools-11491404365ba925bb36935a9f7a14c1afe003cc.tar.gz
external_python_setuptools-11491404365ba925bb36935a9f7a14c1afe003cc.tar.bz2
external_python_setuptools-11491404365ba925bb36935a9f7a14c1afe003cc.zip
Disable workaround for Jython scripts on Linux systems.
--HG-- branch : distribute extra : rebase_source : 289980b084c335029d93732feb8e02da94472795
-rw-r--r--CHANGES.txt1
-rwxr-xr-xsetuptools/command/easy_install.py5
-rw-r--r--setuptools/tests/test_resources.py10
3 files changed, 16 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 2e51b44c..d5a1792a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@ CHANGES
* 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
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 337532bc..cb911173 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1788,6 +1788,11 @@ def chmod(path, mode):
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:
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
index d08fa325..0bc1a095 100644
--- a/setuptools/tests/test_resources.py
+++ b/setuptools/tests/test_resources.py
@@ -561,6 +561,15 @@ class ScriptHeaderTests(TestCase):
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
@@ -584,6 +593,7 @@ class ScriptHeaderTests(TestCase):
'#!%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