Commit 38e4d83e authored by Georgy Berdyshev's avatar Georgy Berdyshev

Allow to bootstrap on Jython.

Signed-off-by: default avatarGeorgy Berdyshev - Георгий Бердышев <codingmaster@gmail.com>
parent 458489b4
......@@ -24,6 +24,8 @@ import os, shutil, sys, tempfile, urllib2
tmpeggs = tempfile.mkdtemp()
is_jython = sys.platform.startswith('java')
try:
import pkg_resources
except ImportError:
......@@ -46,7 +48,20 @@ else:
cmd = 'from setuptools.command.easy_install import main; main()'
ws = pkg_resources.working_set
assert os.spawnle(
if is_jython:
import subprocess
assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
quote(tmpeggs), 'zc.buildout'],
env=dict(os.environ,
PYTHONPATH=
ws.find(pkg_resources.Requirement.parse('setuptools')).location
),
).wait() == 0
else:
assert os.spawnle(
os.P_WAIT, sys.executable, quote (sys.executable),
'-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
dict(os.environ,
......
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