Commit 2e5e7b75 authored by agronholm's avatar agronholm

Get rid of the ugly Jython hack since the subprocess module is now always available

--HG--
branch : distribute
extra : rebase_source : 029d8b3ffa7c7ed71ae2fcae0cfb969624cc67d0
parent f6611f2d
......@@ -28,7 +28,6 @@ import subprocess
from distutils import log
IS_JYTHON = sys.platform.startswith('java')
DEFAULT_VERSION = "0.6.2"
DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
SETUPTOOLS_PKG_INFO = """\
......@@ -54,10 +53,7 @@ def quote(c):
def python_cmd(cmd):
python = quote(sys.executable)
cmd = quote(cmd)
if IS_JYTHON:
return subprocess.Popen([python, cmd]).wait() == 0
args = [os.P_WAIT, python, python] + cmd.split() + [os.environ]
return os.spawnle(*args) == 0
return subprocess.call([python, cmd])
def _install(tarball):
......@@ -371,10 +367,7 @@ def _relaunch():
log.warn('Relaunching...')
# we have to relaunch the process
args = [sys.executable] + sys.argv
if IS_JYTHON:
sys.exit(subprocess.call(args))
else:
sys.exit(os.spawnv(os.P_WAIT, sys.executable, args))
sys.exit(subprocess.call(args))
def extractall(self, path=".", members=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment