1
1
#! /usr/bin/env python
3
# This is an installation script for bzr. Run it with
4
# './setup.py install', or
5
# './setup.py --help' for more options
3
"""Installation script for bzr.
5
'./setup.py install', or
6
'./setup.py --help' for more options
10
# META INFORMATION FOR SETUP
12
META_INFO = {'name': 'bzr',
14
'author': 'Canonical Ltd',
15
'author_email': 'bazaar-ng@lists.ubuntu.com',
16
'url': 'http://www.bazaar-vcs.org/',
17
'description': 'Friendly distributed version control system',
18
'license': 'GNU GPL v2',
21
BZRLIB = {'packages': ['bzrlib',
24
'bzrlib.bundle.serializer',
29
'bzrlib.plugins.launchpad',
31
'bzrlib.store.revision',
32
'bzrlib.store.versioned',
34
'bzrlib.tests.blackbox',
35
'bzrlib.tests.branch_implementations',
36
'bzrlib.tests.bzrdir_implementations',
37
'bzrlib.tests.interrepository_implementations',
38
'bzrlib.tests.interversionedfile_implementations',
39
'bzrlib.tests.repository_implementations',
40
'bzrlib.tests.revisionstore_implementations',
41
'bzrlib.tests.workingtree_implementations',
43
'bzrlib.transport.http',
46
'bzrlib.util.configobj',
47
'bzrlib.util.effbot.org',
48
'bzrlib.util.elementtree',
7
54
# Reinvocation stolen from bzr, we need python2.4 by virtue of bzr_man
8
55
# including bzrlib.help
13
61
version_info = sys.version_info
76
124
import generate_docs
77
125
generate_docs.main(argv=["bzr", "man"])
79
128
########################
81
130
########################
85
author='Canonical Ltd',
86
author_email='bazaar-ng@lists.ubuntu.com',
87
url='http://bazaar-vcs.org/',
88
description='Friendly distributed version control system',
95
'bzrlib.plugins.launchpad',
97
'bzrlib.store.revision',
98
'bzrlib.store.versioned',
100
'bzrlib.tests.blackbox',
101
'bzrlib.tests.branch_implementations',
102
'bzrlib.tests.bzrdir_implementations',
103
'bzrlib.tests.interrepository_implementations',
104
'bzrlib.tests.interversionedfile_implementations',
105
'bzrlib.tests.repository_implementations',
106
'bzrlib.tests.revisionstore_implementations',
107
'bzrlib.tests.workingtree_implementations',
109
'bzrlib.transport.http',
112
'bzrlib.util.elementtree',
113
'bzrlib.util.effbot.org',
114
'bzrlib.util.configobj',
116
'bzrlib.bundle.serializer'
119
cmdclass={'install_scripts': my_install_scripts, 'build': bzr_build},
120
data_files=[('man/man1', ['bzr.1'])],
121
# todo: install the txt files from bzrlib.doc.api.
132
if 'bdist_wininst' in sys.argv:
135
docs = glob.glob('doc/*.htm') + ['doc/default.css']
136
# python's distutils-based win32 installer
137
ARGS = {'scripts': ['bzr', 'tools/win32/bzr-win32-bdist-postinstall.py'],
138
# install the txt files from bzrlib.doc.api.
139
'package_data': {'bzrlib': ['doc/api/*.txt']},
141
'data_files': [('Doc/Bazaar', docs)],
144
ARGS.update(META_INFO)
149
elif 'py2exe' in sys.argv:
153
# pick real bzr version
157
for i in bzrlib.version_info[:4]:
162
version_number.append(str(i))
163
version_str = '.'.join(version_number)
165
target = py2exe.build_exe.Target(script = "bzr",
167
icon_resources = [(0,'bzr.ico')],
168
name = META_INFO['name'],
169
version = version_str,
170
description = META_INFO['description'],
171
author = META_INFO['author'],
172
copyright = "(c) Canonical Ltd, 2005-2006",
173
company_name = "Canonical Ltd.",
174
comments = META_INFO['description'],
176
options_list = {"py2exe": {"packages": BZRLIB['packages'] +
178
"excludes": ["Tkinter", "medusa"],
179
"dist_dir": "win32_bzr.exe",
182
setup(options=options_list,
184
'tools/win32/bzr_postinstall.py',
186
zipfile='lib/library.zip')
190
ARGS = {'scripts': ['bzr'],
191
'data_files': [('man/man1', ['bzr.1'])],
192
# install the txt files from bzrlib.doc.api.
193
'package_data': {'bzrlib': ['doc/api/*.txt']},
194
'cmdclass': {'build': bzr_build,
195
'install_scripts': my_install_scripts,
199
ARGS.update(META_INFO)