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  | 
|
8  | 
||
| 
1185.1.40
by Robert Collins
 Merge what applied of Alexander Belchenko's win32 patch.  | 
9  | 
# more sophisticated setup script, based on pychecker setup.py
 | 
10  | 
import sys, os  | 
|
11  | 
from distutils.command.build_scripts import build_scripts  | 
|
12  | 
||
13  | 
||
14  | 
###############################
 | 
|
15  | 
# Overridden distutils actions
 | 
|
16  | 
###############################
 | 
|
17  | 
||
18  | 
class my_build_scripts(build_scripts):  | 
|
19  | 
"""Customized build_scripts distutils action.  | 
|
20  | 
||
21  | 
    Create bzr.bat for win32.
 | 
|
22  | 
    """
 | 
|
23  | 
||
24  | 
def run(self):  | 
|
25  | 
if sys.platform == "win32":  | 
|
26  | 
bat_path = os.path.join(self.build_dir, "bzr.bat")  | 
|
27  | 
self.scripts.append(bat_path)  | 
|
28  | 
self.mkpath(self.build_dir)  | 
|
29  | 
scripts_dir = self.distribution.get_command_obj("install").\  | 
|
30  | 
                                                            install_scripts
 | 
|
31  | 
self.execute(func=self._create_bat,  | 
|
32  | 
args=[bat_path, scripts_dir],  | 
|
33  | 
msg="Create %s" % bat_path)  | 
|
34  | 
build_scripts.run(self) # invoke "standard" action  | 
|
35  | 
||
36  | 
def _create_bat(self, bat_path, scripts_dir):  | 
|
37  | 
""" Creates the batch file for bzr on win32.  | 
|
38  | 
        """
 | 
|
39  | 
try:  | 
|
40  | 
script_path = os.path.join(scripts_dir, "bzr")  | 
|
41  | 
bat_str = "@%s %s %%*\n" % (sys.executable, script_path)  | 
|
42  | 
file(bat_path, "w").write(bat_str)  | 
|
43  | 
print "file written"  | 
|
44  | 
except Exception, e:  | 
|
45  | 
print "ERROR: Unable to create %s: %s" % (bat_path, e)  | 
|
46  | 
raise e  | 
|
47  | 
||
48  | 
||
49  | 
########################
 | 
|
50  | 
## Setup
 | 
|
51  | 
########################
 | 
|
52  | 
||
| 
45
by Martin Pool
 - add setup.py and install instructions  | 
53  | 
setup(name='bzr',  | 
| 
1185.1.40
by Robert Collins
 Merge what applied of Alexander Belchenko's win32 patch.  | 
54  | 
version='0.0.6',  | 
| 
45
by Martin Pool
 - add setup.py and install instructions  | 
55  | 
author='Martin Pool',  | 
56  | 
author_email='mbp@sourcefrog.net',  | 
|
57  | 
url='http://www.bazaar-ng.org/',  | 
|
58  | 
description='Friendly distributed version control system',  | 
|
59  | 
license='GNU GPL v2',  | 
|
| 
974.1.26
by aaron.bentley at utoronto
 merged mbp@sourcefrog.net-20050817233101-0939da1cf91f2472  | 
60  | 
packages=['bzrlib',  | 
61  | 
'bzrlib.plugins',  | 
|
62  | 
'bzrlib.selftest',  | 
|
63  | 
'bzrlib.util',  | 
|
| 
1414
by Robert Collins
 merge in an adjusted version of Jelmer's empty-log detection patch.  | 
64  | 
'bzrlib.transport',  | 
65  | 
'bzrlib.store',  | 
|
| 
974.1.26
by aaron.bentley at utoronto
 merged mbp@sourcefrog.net-20050817233101-0939da1cf91f2472  | 
66  | 
'bzrlib.util.elementtree',  | 
67  | 
'bzrlib.util.effbot.org',  | 
|
| 
974.1.53
by aaron.bentley at utoronto
 Disabled urlgrabber  | 
68  | 
                ],
 | 
| 
45
by Martin Pool
 - add setup.py and install instructions  | 
69  | 
scripts=['bzr'])  |