~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: mbp at sourcefrog
  • Date: 2005-04-01 04:04:04 UTC
  • Revision ID: mbp@sourcefrog.net-20050401040404-c5cd90f539e27f91
bzr commit --help now works

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
# './setup.py --help' for more options
6
6
 
7
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
8
 
43
9
setup(name='bzr',
44
 
      version='0.1',
 
10
      version='0.0.0',
45
11
      author='Martin Pool',
46
12
      author_email='mbp@sourcefrog.net',
47
13
      url='http://www.bazaar-ng.org/',
48
14
      description='Friendly distributed version control system',
49
15
      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
 
     )
 
16
      packages=['bzrlib'],
 
17
      scripts=['bzr'])