/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
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.29.3 by Wouter van Heyst
Create bzr.1 manpage from setup.py
9
from distutils.command.build import build
1185.1.40 by Robert Collins
Merge what applied of Alexander Belchenko's win32 patch.
10
11
12
###############################
13
# Overridden distutils actions
14
###############################
15
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
16
class my_install_scripts(install_scripts):
17
    """ Customized install_scripts distutils action.
1185.1.40 by Robert Collins
Merge what applied of Alexander Belchenko's win32 patch.
18
    Create bzr.bat for win32.
19
    """
20
    def run(self):
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
21
        import os
22
        import sys
23
24
        install_scripts.run(self)   # standard action
25
1185.1.40 by Robert Collins
Merge what applied of Alexander Belchenko's win32 patch.
26
        if sys.platform == "win32":
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
27
            try:
28
                scripts_dir = self.install_dir
29
                script_path = os.path.join(scripts_dir, "bzr")
30
                batch_str = "@%s %s %%*\n" % (sys.executable, script_path)
31
                batch_path = script_path + ".bat"
32
                f = file(batch_path, "w")
33
                f.write(batch_str)
34
                f.close()
35
                print "Created:", batch_path
36
            except Exception, e:
37
                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.
38
39
1185.29.3 by Wouter van Heyst
Create bzr.1 manpage from setup.py
40
class bzr_build(build):
41
    """Customized build distutils action.
42
    Generate bzr.1.
43
    """
44
    def run(self):
45
        build.run(self)
46
47
        import bzr_man
48
        bzr_man.main()
49
1185.1.40 by Robert Collins
Merge what applied of Alexander Belchenko's win32 patch.
50
########################
51
## Setup
52
########################
53
45 by Martin Pool
- add setup.py and install instructions
54
setup(name='bzr',
1185.29.4 by Wouter van Heyst
bump version to 0.6
55
      version='0.6',
45 by Martin Pool
- add setup.py and install instructions
56
      author='Martin Pool',
57
      author_email='mbp@sourcefrog.net',
58
      url='http://www.bazaar-ng.org/',
59
      description='Friendly distributed version control system',
60
      license='GNU GPL v2',
974.1.26 by aaron.bentley at utoronto
merged mbp@sourcefrog.net-20050817233101-0939da1cf91f2472
61
      packages=['bzrlib',
62
                'bzrlib.plugins',
63
                'bzrlib.selftest',
64
                'bzrlib.util',
1414 by Robert Collins
merge in an adjusted version of Jelmer's empty-log detection patch.
65
                'bzrlib.transport',
66
                'bzrlib.store',
974.1.26 by aaron.bentley at utoronto
merged mbp@sourcefrog.net-20050817233101-0939da1cf91f2472
67
                'bzrlib.util.elementtree',
68
                'bzrlib.util.effbot.org',
1185.12.58 by Aaron Bentley
Included configobj in setup.py
69
                'bzrlib.util.configobj',
974.1.53 by aaron.bentley at utoronto
Disabled urlgrabber
70
                ],
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
71
      scripts=['bzr'],
1185.29.3 by Wouter van Heyst
Create bzr.1 manpage from setup.py
72
      cmdclass={'install_scripts': my_install_scripts, 'build': bzr_build},
73
      data_files=[('man/man1', ['bzr.1'])],
1185.23.1 by Aaron Bentley
win32 setup fixes from Belchenko
74
     )