~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-04 08:13:07 UTC
  • mfrom: (2039.2.4 python25)
  • Revision ID: pqm@pqm.ubuntu.com-20061004081307-413acd85912dbab0
(mbp) let bzr+ssh:// work without paramiko

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
META_INFO = {'name':         'bzr',
18
18
             'version':      bzrlib.__version__,
19
19
             'author':       'Canonical Ltd',
20
 
             'author_email': 'bazaar@lists.canonical.com',
 
20
             'author_email': 'bazaar-ng@lists.ubuntu.com',
21
21
             'url':          'http://www.bazaar-vcs.org/',
22
22
             'description':  'Friendly distributed version control system',
23
23
             'license':      'GNU GPL v2',
99
99
    Create bzr.bat for win32.
100
100
    """
101
101
    def run(self):
 
102
        import os
 
103
        import sys
 
104
 
102
105
        install_scripts.run(self)   # standard action
103
106
 
104
107
        if sys.platform == "win32":
124
127
            return path
125
128
 
126
129
    def _win_batch_args(self):
127
 
        from bzrlib.win32utils import winver
128
 
        if winver == 'Windows NT':
 
130
        if os.name == 'nt':
129
131
            return '%*'
130
132
        else:
131
133
            return '%1 %2 %3 %4 %5 %6 %7 %8 %9'
147
149
## Setup
148
150
########################
149
151
 
150
 
command_classes = {'install_scripts': my_install_scripts,
151
 
                  'build': bzr_build}
152
 
ext_modules = []
153
 
try:
154
 
    from Pyrex.Distutils import build_ext
155
 
except ImportError:
156
 
    # try to build the extension from the prior generated source.
157
 
    print ("Pyrex not available, while bzr will build, "
158
 
           "you cannot modify the C extensions.")
159
 
    from distutils.command.build_ext import build_ext
160
 
    from distutils.extension import Extension
161
 
    #ext_modules.append(
162
 
    #    Extension("bzrlib.modulename", ["bzrlib/foo.c"], libraries = []))
163
 
else:
164
 
    from distutils.extension import Extension
165
 
    #ext_modules.append(
166
 
    #    Extension("bzrlib.modulename", ["bzrlib/foo.pyx"], libraries = []))
167
 
command_classes['build_ext'] = build_ext
168
 
 
169
152
if 'bdist_wininst' in sys.argv:
170
153
    import glob
171
154
    # doc files
205
188
                                     version = version_str,
206
189
                                     description = META_INFO['description'],
207
190
                                     author = META_INFO['author'],
208
 
                                     copyright = "(c) Canonical Ltd, 2005-2007",
 
191
                                     copyright = "(c) Canonical Ltd, 2005-2006",
209
192
                                     company_name = "Canonical Ltd.",
210
193
                                     comments = META_INFO['description'],
211
194
                                    )
212
 
 
213
 
    additional_packages =  []
214
 
    if sys.version.startswith('2.4'):
215
 
        # adding elementtree package
216
 
        additional_packages.append('elementtree')
217
 
    elif sys.version.startswith('2.5'):
218
 
        additional_packages.append('xml.etree')
219
 
    else:
220
 
        import warnings
221
 
        warnings.warn('Unknown Python version.\n'
222
 
                      'Please check setup.py script for compatibility.')
223
 
 
224
195
    options_list = {"py2exe": {"packages": BZRLIB['packages'] +
225
 
                                           additional_packages,
 
196
                                           ['elementtree'],
226
197
                               "excludes": ["Tkinter", "medusa"],
227
198
                               "dist_dir": "win32_bzr.exe",
228
199
                              },
237
208
    # std setup
238
209
    ARGS = {'scripts': ['bzr'],
239
210
            'data_files': [('man/man1', ['bzr.1'])],
240
 
            'cmdclass': command_classes,
241
 
            'ext_modules': ext_modules,
 
211
            'cmdclass': {'build': bzr_build,
 
212
                         'install_scripts': my_install_scripts,
 
213
                        },
242
214
           }
243
215
    
244
216
    ARGS.update(META_INFO)