~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Martin Pool
  • Date: 2005-09-01 02:34:38 UTC
  • Revision ID: mbp@sourcefrog.net-20050901023437-bf791a0ef5edae8d
- old docs: clarify that this is not mainly descended from arch anymore

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/',
51
17
                'bzrlib.plugins',
52
18
                'bzrlib.selftest',
53
19
                'bzrlib.util',
54
 
                'bzrlib.transport',
55
 
                'bzrlib.store',
56
20
                'bzrlib.util.elementtree',
57
21
                'bzrlib.util.effbot.org',
58
 
                'bzrlib.util.configobj',
59
 
                ],
60
 
      scripts=['bzr'],
61
 
      cmdclass={'install_scripts': my_install_scripts},
62
 
     )
 
22
                'bzrlib.util.urlgrabber'],
 
23
      scripts=['bzr'])