20
23
'license': 'GNU GPL v2',
23
BZRLIB = {'packages': ['bzrlib',
26
'bzrlib.bundle.serializer',
31
'bzrlib.plugins.launchpad',
33
'bzrlib.store.revision',
34
'bzrlib.store.versioned',
36
'bzrlib.tests.blackbox',
37
'bzrlib.tests.branch_implementations',
38
'bzrlib.tests.bzrdir_implementations',
39
'bzrlib.tests.interrepository_implementations',
40
'bzrlib.tests.intertree_implementations',
41
'bzrlib.tests.interversionedfile_implementations',
42
'bzrlib.tests.repository_implementations',
43
'bzrlib.tests.revisionstore_implementations',
44
'bzrlib.tests.tree_implementations',
45
'bzrlib.tests.workingtree_implementations',
47
'bzrlib.transport.http',
50
'bzrlib.util.configobj',
51
'bzrlib.util.effbot.org',
52
'bzrlib.util.elementtree',
26
# The list of packages is automatically generated later. Add other things
27
# that are part of BZRLIB here.
30
PKG_DATA = {# install files from selftest suite
31
'package_data': {'bzrlib': ['doc/api/*.txt',
32
'tests/test_patches_data/*',
57
36
######################################################################
58
37
# Reinvocation stolen from bzr, we need python2.4 by virtue of bzr_man
59
38
# including bzrlib.help
65
41
version_info = sys.version_info
66
42
except AttributeError:
86
62
os.unsetenv(REINVOKE)
65
def get_bzrlib_packages():
66
"""Recurse through the bzrlib directory, and extract the package names"""
69
base_path = os.path.dirname(os.path.abspath(bzrlib.__file__))
70
for root, dirs, files in os.walk(base_path):
71
if '__init__.py' in files:
72
assert root.startswith(base_path)
73
# Get just the path below bzrlib
74
package_path = root[len(base_path):]
75
# Remove leading and trailing slashes
76
package_path = package_path.strip('\\/')
78
package_name = 'bzrlib'
80
package_name = ('bzrlib.' +
81
package_path.replace('/', '.').replace('\\', '.'))
82
packages.append(package_name)
83
return sorted(packages)
86
BZRLIB['packages'] = get_bzrlib_packages()
89
89
from distutils.core import setup
90
90
from distutils.command.install_scripts import install_scripts
91
91
from distutils.command.build import build
155
155
docs = glob.glob('doc/*.htm') + ['doc/default.css']
156
156
# python's distutils-based win32 installer
157
157
ARGS = {'scripts': ['bzr', 'tools/win32/bzr-win32-bdist-postinstall.py'],
158
# install the txt files from bzrlib.doc.api.
159
'package_data': {'bzrlib': ['doc/api/*.txt']},
161
159
'data_files': [('Doc/Bazaar', docs)],
164
162
ARGS.update(META_INFO)
165
163
ARGS.update(BZRLIB)
164
ARGS.update(PKG_DATA)
210
209
ARGS = {'scripts': ['bzr'],
211
210
'data_files': [('man/man1', ['bzr.1'])],
212
# install the txt files from bzrlib.doc.api.
213
'package_data': {'bzrlib': ['doc/api/*.txt']},
214
211
'cmdclass': {'build': bzr_build,
215
212
'install_scripts': my_install_scripts,