~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Robert Collins
  • Date: 2005-10-30 00:00:09 UTC
  • mfrom: (1185.16.134)
  • Revision ID: robertc@robertcollins.net-20051030000009-9db99a338a0dfdac
MergeĀ fromĀ Martin.

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