~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Martin Pool
  • Date: 2008-01-17 07:13:24 UTC
  • mto: (3280.2.2 prepare-1.3)
  • mto: This revision was merged to the branch mainline in revision 3284.
  • Revision ID: mbp@sourcefrog.net-20080117071324-w6ta4vzprpl4ouas
Always take README text from the right directory (thanks jam)

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
 
12
 
# NOTE: This assumes we're being run from the setup.py directory, so it can be
13
 
# loaded from the cwd.
 
13
# NOTE: The directory containing setup.py, whether run by 'python setup.py' or
 
14
# './setup.py' or the equivalent with another path, should always be at the
 
15
# start of the path, so this should find the right one...
14
16
import bzrlib
15
17
 
 
18
def get_long_description():
 
19
    dirname = os.path.dirname(__file__)
 
20
    readme = os.path.join(dirname, 'README')
 
21
    f = open(readme, 'rb')
 
22
    try:
 
23
        return f.read()
 
24
    finally:
 
25
        f.close()
 
26
 
 
27
 
16
28
##
17
29
# META INFORMATION FOR SETUP
18
30
# see http://docs.python.org/dist/meta-data.html
25
37
    'description':  'Friendly distributed version control system',
26
38
    'license':      'GNU GPL v2',
27
39
    'download_url': 'http://bazaar-vcs.org/Download',
28
 
    'long_description': file("README").read(),
 
40
    'long_description': get_long_description(),
29
41
    'classifiers': [
30
42
        'Development Status :: 6 - Mature',
31
43
        'Environment :: Console',