/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 23:41:35 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506234135-yivbzczw1sejxnxc
Lock methods on ``Tree``, ``Branch`` and ``Repository`` are now
expected to return an object which can be used to unlock them. This reduces
duplicate code when using cleanups. The previous 'tokens's returned by
``Branch.lock_write`` and ``Repository.lock_write`` are now attributes
on the result of the lock_write. ``repository.RepositoryWriteLockResult``
and ``branch.BranchWriteLockResult`` document this. (Robert Collins)

``log._get_info_for_log_files`` now takes an add_cleanup callable.
(Robert Collins)

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
51
 
env = dict(
52
 
    os.environ,
53
 
    PYTHONPATH=ws.find(pkg_resources.Requirement.parse('setuptools')).location)
 
50
ws  = pkg_resources.working_set
54
51
 
55
52
if is_jython:
56
53
    import subprocess
57
 
 
58
 
    assert subprocess.Popen(
59
 
        [sys.executable] +
60
 
        ['-c', quote(cmd), '-mqNxd', quote(tmpeggs), 'zc.buildout'],
61
 
        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
62
62
 
63
63
else:
64
64
    assert os.spawnle(
65
 
        os.P_WAIT, sys.executable, quote(sys.executable),
66
 
        '-c', quote(cmd), '-mqNxd', quote(tmpeggs), 'zc.buildout', env,
 
65
        os.P_WAIT, sys.executable, quote (sys.executable),
 
66
        '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
 
67
        dict(os.environ,
 
68
            PYTHONPATH=
 
69
            ws.find(pkg_resources.Requirement.parse('setuptools')).location
 
70
            ),
67
71
        ) == 0
68
72
 
69
73
ws.add_entry(tmpeggs)