/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

Merge bzr.dev r3466

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
"""
8
8
 
9
9
import os
 
10
import os.path
10
11
import sys
11
12
 
 
13
if sys.version_info < (2, 4):
 
14
    sys.stderr.write("[ERROR] Not a supported Python version. Need 2.4+\n")
 
15
    sys.exit(1)
 
16
 
 
17
# NOTE: The directory containing setup.py, whether run by 'python setup.py' or
 
18
# './setup.py' or the equivalent with another path, should always be at the
 
19
# start of the path, so this should find the right one...
12
20
import bzrlib
13
21
 
 
22
def get_long_description():
 
23
    dirname = os.path.dirname(__file__)
 
24
    readme = os.path.join(dirname, 'README')
 
25
    f = open(readme, 'rb')
 
26
    try:
 
27
        return f.read()
 
28
    finally:
 
29
        f.close()
 
30
 
 
31
 
14
32
##
15
33
# META INFORMATION FOR SETUP
16
 
 
17
 
META_INFO = {'name':         'bzr',
18
 
             'version':      bzrlib.__version__,
19
 
             'author':       'Canonical Ltd',
20
 
             'author_email': 'bazaar@lists.canonical.com',
21
 
             'url':          'http://www.bazaar-vcs.org/',
22
 
             'description':  'Friendly distributed version control system',
23
 
             'license':      'GNU GPL v2',
24
 
            }
 
34
# see http://docs.python.org/dist/meta-data.html
 
35
META_INFO = {
 
36
    'name':         'bzr',
 
37
    'version':      bzrlib.__version__,
 
38
    'author':       'Canonical Ltd',
 
39
    'author_email': 'bazaar@lists.canonical.com',
 
40
    'url':          'http://www.bazaar-vcs.org/',
 
41
    'description':  'Friendly distributed version control system',
 
42
    'license':      'GNU GPL v2',
 
43
    'download_url': 'http://bazaar-vcs.org/Download',
 
44
    'long_description': get_long_description(),
 
45
    'classifiers': [
 
46
        'Development Status :: 6 - Mature',
 
47
        'Environment :: Console',
 
48
        'Intended Audience :: Developers',
 
49
        'Intended Audience :: System Administrators',
 
50
        'License :: OSI Approved :: GNU General Public License (GPL)',
 
51
        'Operating System :: Microsoft :: Windows',
 
52
        'Operating System :: OS Independent',
 
53
        'Operating System :: POSIX',
 
54
        'Programming Language :: Python',
 
55
        'Programming Language :: C',
 
56
        'Topic :: Software Development :: Version Control',
 
57
        ],
 
58
    }
25
59
 
26
60
# The list of packages is automatically generated later. Add other things
27
61
# that are part of BZRLIB here.
34
68
                                       ]},
35
69
           }
36
70
 
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
71
 
67
72
def get_bzrlib_packages():
68
73
    """Recurse through the bzrlib directory, and extract the package names"""