~bzr-pqm/bzr/bzr.dev

45 by Martin Pool
- add setup.py and install instructions
1
#! /usr/bin/env python
2
3
# This is an installation script for bzr.  Run it with
4
# './setup.py install', or
5
# './setup.py --help' for more options
6
7
from distutils.core import setup
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
8
from distutils.command.install_scripts import install_scripts
1185.1.40 by Robert Collins
Merge what applied of Alexander Belchenko's win32 patch.
9
10
11
###############################
12
# Overridden distutils actions
13
###############################
14
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
15
class my_install_scripts(install_scripts):
16
    """ Customized install_scripts distutils action.
1185.1.40 by Robert Collins
Merge what applied of Alexander Belchenko's win32 patch.
17
    Create bzr.bat for win32.
18
    """
19
    def run(self):
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
20
        import os
21
        import sys
22
23
        install_scripts.run(self)   # standard action
24
1185.1.40 by Robert Collins
Merge what applied of Alexander Belchenko's win32 patch.
25
        if sys.platform == "win32":
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
26
            try:
27
                scripts_dir = self.install_dir
28
                script_path = os.path.join(scripts_dir, "bzr")
29
                batch_str = "@%s %s %%*\n" % (sys.executable, script_path)
30
                batch_path = script_path + ".bat"
31
                f = file(batch_path, "w")
32
                f.write(batch_str)
33
                f.close()
34
                print "Created:", batch_path
35
            except Exception, e:
36
                print "ERROR: Unable to create %s: %s" % (batch_path, e)
1185.1.40 by Robert Collins
Merge what applied of Alexander Belchenko's win32 patch.
37
38
39
########################
40
## Setup
41
########################
42
45 by Martin Pool
- add setup.py and install instructions
43
setup(name='bzr',
1185.13.1 by Robert Collins
Merge in format-5 work - release bzr 0.1rc1.
44
      version='0.1',
45 by Martin Pool
- add setup.py and install instructions
45
      author='Martin Pool',
46
      author_email='mbp@sourcefrog.net',
47
      url='http://www.bazaar-ng.org/',
48
      description='Friendly distributed version control system',
49
      license='GNU GPL v2',
974.1.26 by aaron.bentley at utoronto
merged mbp@sourcefrog.net-20050817233101-0939da1cf91f2472
50
      packages=['bzrlib',
51
                'bzrlib.plugins',
52
                'bzrlib.selftest',
53
                'bzrlib.util',
1414 by Robert Collins
merge in an adjusted version of Jelmer's empty-log detection patch.
54
                'bzrlib.transport',
55
                'bzrlib.store',
974.1.26 by aaron.bentley at utoronto
merged mbp@sourcefrog.net-20050817233101-0939da1cf91f2472
56
                'bzrlib.util.elementtree',
57
                'bzrlib.util.effbot.org',
1185.12.58 by Aaron Bentley
Included configobj in setup.py
58
                'bzrlib.util.configobj',
974.1.53 by aaron.bentley at utoronto
Disabled urlgrabber
59
                ],
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
60
      scripts=['bzr'],
61
      cmdclass={'install_scripts': my_install_scripts},
62
     )