~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Martin Pool
  • Date: 2007-04-24 05:02:04 UTC
  • mfrom: (2449 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2450.
  • Revision ID: mbp@sourcefrog.net-20070424050204-bfkc1qiq0axt5f14
Merge trunk & fix NEWS conflict

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
## Setup
148
148
########################
149
149
 
 
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
 
150
169
if 'bdist_wininst' in sys.argv:
151
170
    import glob
152
171
    # doc files
218
237
    # std setup
219
238
    ARGS = {'scripts': ['bzr'],
220
239
            'data_files': [('man/man1', ['bzr.1'])],
221
 
            'cmdclass': {'build': bzr_build,
222
 
                         'install_scripts': my_install_scripts,
223
 
                        },
 
240
            'cmdclass': command_classes,
 
241
            'ext_modules': ext_modules,
224
242
           }
225
243
    
226
244
    ARGS.update(META_INFO)