Commit d52e6074 authored by georgyberdyshev's avatar georgyberdyshev

Allow to bootstrap using the development version.

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


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@90479 62d5b8a3-27da-0310-9561-8e5933582275
parent 47f861bd
...@@ -21,6 +21,11 @@ $Id$ ...@@ -21,6 +21,11 @@ $Id$
import os, sys, urllib2 import os, sys, urllib2
is_jython = sys.platform.startswith('java')
if is_jython:
import subprocess
for d in 'eggs', 'develop-eggs', 'bin': for d in 'eggs', 'develop-eggs', 'bin':
if not os.path.exists(d): if not os.path.exists(d):
os.mkdir(d) os.mkdir(d)
...@@ -35,10 +40,16 @@ except ImportError: ...@@ -35,10 +40,16 @@ except ImportError:
import pkg_resources import pkg_resources
os.spawnle(os.P_WAIT, sys.executable, sys.executable, 'setup.py', if is_jython:
'-q', 'develop', '-m', '-x', '-d', 'develop-eggs', subprocess.Popen([sys.executable] + ['setup.py', '-q', 'develop', '-m', '-x',
{'PYTHONPATH': os.path.dirname(pkg_resources.__file__)}, '-d', 'develop-eggs'],
) env = {'PYTHONPATH': os.path.dirname(pkg_resources.__file__)}).wait()
else:
os.spawnle(os.P_WAIT, sys.executable, sys.executable, 'setup.py',
'-q', 'develop', '-m', '-x', '-d', 'develop-eggs',
{'PYTHONPATH': os.path.dirname(pkg_resources.__file__)},
)
pkg_resources.working_set.add_entry('src') pkg_resources.working_set.add_entry('src')
import zc.buildout.easy_install import zc.buildout.easy_install
...@@ -46,4 +57,10 @@ zc.buildout.easy_install.scripts( ...@@ -46,4 +57,10 @@ zc.buildout.easy_install.scripts(
['zc.buildout'], pkg_resources.working_set , sys.executable, 'bin') ['zc.buildout'], pkg_resources.working_set , sys.executable, 'bin')
bin_buildout = os.path.join('bin', 'buildout') bin_buildout = os.path.join('bin', 'buildout')
sys.exit(os.spawnl(os.P_WAIT, bin_buildout, bin_buildout))
if is_jython:
# Jython needs the script to be called twice via sys.executable
assert subprocess.Popen([sys.executable] + [bin_buildout]).wait() == 0
sys.exit(subprocess.Popen([sys.executable] + [bin_buildout]).wait())
else:
sys.exit(os.spawnl(os.P_WAIT, bin_buildout, bin_buildout))
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