~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

silly commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
from distutils.command.install_scripts import install_scripts
9
 
 
10
 
 
11
 
###############################
12
 
# Overridden distutils actions
13
 
###############################
14
 
 
15
 
class my_install_scripts(install_scripts):
16
 
    """ Customized install_scripts distutils action.
17
 
    Create bzr.bat for win32.
18
 
    """
19
 
    def run(self):
20
 
        import os
21
 
        import sys
22
 
 
23
 
        install_scripts.run(self)   # standard action
24
 
 
25
 
        if sys.platform == "win32":
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)
37
 
 
38
 
 
39
 
########################
40
 
## Setup
41
 
########################
42
 
 
43
 
setup(name='bzr',
44
 
      version='0.1',
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',
50
 
      packages=['bzrlib',
51
 
                'bzrlib.plugins',
52
 
                'bzrlib.selftest',
53
 
                'bzrlib.util',
54
 
                'bzrlib.transport',
55
 
                'bzrlib.store',
56
 
                'bzrlib.util.elementtree',
57
 
                'bzrlib.util.effbot.org',
58
 
                'bzrlib.util.configobj',
59
 
                ],
60
 
      scripts=['bzr'],
61
 
      cmdclass={'install_scripts': my_install_scripts},
62
 
     )