Commit 9278b9da authored by Georgy Berdyshev's avatar Georgy Berdyshev

Allow to bootstrap using the development version.

Signed-off-by: default avatarGeorgy Berdyshev - Георгий Бердышев <codingmaster@gmail.com>
parent 38e4d83e
...@@ -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:
subprocess.Popen([sys.executable] + ['setup.py', '-q', 'develop', '-m', '-x',
'-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', '-q', 'develop', '-m', '-x', '-d', 'develop-eggs',
{'PYTHONPATH': os.path.dirname(pkg_resources.__file__)}, {'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