Commit 47f861bd authored by georgyberdyshev's avatar georgyberdyshev

Allow to bootstrap on Jython.

Signed-off-by: default avatarGeorgy Berdyshev - Георгий Бердышев <codingmaster@gmail.com>


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@90478 62d5b8a3-27da-0310-9561-8e5933582275
parent 7b62a9e7
...@@ -24,6 +24,8 @@ import os, shutil, sys, tempfile, urllib2 ...@@ -24,6 +24,8 @@ import os, shutil, sys, tempfile, urllib2
tmpeggs = tempfile.mkdtemp() tmpeggs = tempfile.mkdtemp()
is_jython = sys.platform.startswith('java')
try: try:
import pkg_resources import pkg_resources
except ImportError: except ImportError:
...@@ -46,7 +48,20 @@ else: ...@@ -46,7 +48,20 @@ else:
cmd = 'from setuptools.command.easy_install import main; main()' cmd = 'from setuptools.command.easy_install import main; main()'
ws = pkg_resources.working_set 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), os.P_WAIT, sys.executable, quote (sys.executable),
'-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout', '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
dict(os.environ, 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