/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tools/win32/bootstrap.py

  • Committer: Robert Collins
  • Date: 2010-05-06 11:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506110810-h3j07fh5gmw54s25
Cleaner matcher matching revised unlocking protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    import pkg_resources
31
31
except ImportError:
32
32
    ez = {}
33
 
    exec(urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
34
 
                         ).read(), ez)
 
33
    exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
 
34
                         ).read() in ez
35
35
    ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
36
36
 
37
37
    import pkg_resources
43
43
        else:
44
44
            return c
45
45
else:
46
 
    def quote(c):
 
46
    def quote (c):
47
47
        return c
48
48
 
49
49
cmd = 'from setuptools.command.easy_install import main; main()'
50
 
ws = pkg_resources.working_set
 
50
ws  = pkg_resources.working_set
51
51
 
52
52
if is_jython:
53
53
    import subprocess
54
 
 
55
 
    env = dict(
56
 
        os.environ,
57
 
        PYTHONPATH=ws.find(
58
 
            pkg_resources.Requirement.parse('setuptools')).location
59
 
        )
60
 
 
61
 
    assert subprocess.Popen(
62
 
        [sys.executable] +
63
 
        ['-c', quote(cmd), '-mqNxd', quote(tmpeggs), 'zc.buildout'],
64
 
        env=env,).wait() == 0
 
54
    
 
55
    assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd', 
 
56
           quote(tmpeggs), 'zc.buildout'], 
 
57
           env=dict(os.environ,
 
58
               PYTHONPATH=
 
59
               ws.find(pkg_resources.Requirement.parse('setuptools')).location
 
60
               ),
 
61
           ).wait() == 0
65
62
 
66
63
else:
67
64
    assert os.spawnle(
68
 
        os.P_WAIT, sys.executable, quote(sys.executable),
69
 
        '-c', quote(cmd), '-mqNxd', quote(tmpeggs), 'zc.buildout',
70
 
        dict(
71
 
            os.environ,
 
65
        os.P_WAIT, sys.executable, quote (sys.executable),
 
66
        '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
 
67
        dict(os.environ,
72
68
            PYTHONPATH=
73
69
            ws.find(pkg_resources.Requirement.parse('setuptools')).location
74
70
            ),