aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-20 21:03:56 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-20 21:03:56 -0500
commitadbb4edde04b071e4b092b675bb0c2ffb66a0977 (patch)
treea8ece18c0557c127b7965f2c1744e0c89f99b261 /setuptools/command/easy_install.py
parent9209b9f7ce6ecb4d9518037b2463bbedd544dcfc (diff)
downloadexternal_python_setuptools-adbb4edde04b071e4b092b675bb0c2ffb66a0977.tar.gz
external_python_setuptools-adbb4edde04b071e4b092b675bb0c2ffb66a0977.tar.bz2
external_python_setuptools-adbb4edde04b071e4b092b675bb0c2ffb66a0977.zip
Deprecate fix_jython_executable and replace with JythonCommandSpec
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py23
1 files changed, 6 insertions, 17 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 5e25f2cd..b8efff73 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1844,25 +1844,14 @@ 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
+ warnings.warn("Use JythonCommandSpec", DeprecationWarning, stacklevel=2)
- if java.lang.System.getProperty("os.name") == "Linux":
- return executable
+ if not JythonCommandSpec.relevant():
+ return executable
- # Workaround Jython's sys.executable being a .sh (an invalid
- # shebang line interpreter)
- if options:
- # Can't apply the workaround, leave it broken
- log.warn(
- "WARNING: Unable to adapt shebang line for Jython,"
- " the following script is NOT executable\n"
- " see http://bugs.jython.org/issue1112 for"
- " more information.")
- else:
- return '/usr/bin/env %s' % executable
- return executable
+ cmd = CommandSpec.best().from_param(executable)
+ cmd.install_options(options)
+ return cmd.as_header().lstrip('#!').rstrip('\n')
class CommandSpec(list):