/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 setup.py

  • Committer: John Arbash Meinel
  • Date: 2008-03-14 16:23:28 UTC
  • mfrom: (3276 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3279.
  • Revision ID: john@arbash-meinel.com-20080314162328-9uc5ut91w0at3otd
[merge] bzr.dev 3276

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
import os
10
10
import sys
11
11
 
 
12
if sys.version_info < (2, 4):
 
13
    sys.stderr.write("[ERROR] Not a supported Python version. Need 2.4+\n")
 
14
    sys.exit(1)
 
15
 
12
16
import bzrlib
13
17
 
14
18
##
34
38
                                       ]},
35
39
           }
36
40
 
37
 
######################################################################
38
 
# Reinvocation stolen from bzr, we need python2.4 by virtue of bzr_man
39
 
# including bzrlib.help
40
 
 
41
 
try:
42
 
    version_info = sys.version_info
43
 
except AttributeError:
44
 
    version_info = 1, 5 # 1.5 or older
45
 
 
46
 
REINVOKE = "__BZR_REINVOKE"
47
 
NEED_VERS = (2, 4)
48
 
KNOWN_PYTHONS = ('python2.4',)
49
 
 
50
 
if version_info < NEED_VERS:
51
 
    if not os.environ.has_key(REINVOKE):
52
 
        # mutating os.environ doesn't work in old Pythons
53
 
        os.putenv(REINVOKE, "1")
54
 
        for python in KNOWN_PYTHONS:
55
 
            try:
56
 
                os.execvp(python, [python] + sys.argv)
57
 
            except OSError:
58
 
                pass
59
 
    sys.stderr.write("bzr: error: cannot find a suitable python interpreter\n")
60
 
    sys.stderr.write("  (need %d.%d or later)" % NEED_VERS)
61
 
    sys.stderr.write('\n')
62
 
    sys.exit(1)
63
 
if getattr(os, "unsetenv", None) is not None:
64
 
    os.unsetenv(REINVOKE)
65
 
 
66
41
 
67
42
def get_bzrlib_packages():
68
43
    """Recurse through the bzrlib directory, and extract the package names"""