/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Martin Pool
  • Date: 2009-06-05 23:21:51 UTC
  • mfrom: (4415 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4416.
  • Revision ID: mbp@sourcefrog.net-20090605232151-luwmyyl95siraqyz
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
224
224
unavailable_files = []
225
225
 
226
226
 
227
 
def add_pyrex_extension(module_name, libraries=None):
 
227
def add_pyrex_extension(module_name, libraries=None, extra_source=[]):
228
228
    """Add a pyrex module to build.
229
229
 
230
230
    This will use Pyrex to auto-generate the .c file if it is available.
247
247
        # right value.
248
248
        define_macros.append(('WIN32', None))
249
249
    if have_pyrex:
250
 
        ext_modules.append(Extension(module_name, [pyrex_name],
251
 
            define_macros=define_macros, libraries=libraries))
 
250
        source = [pyrex_name]
252
251
    else:
253
252
        if not os.path.isfile(c_name):
254
253
            unavailable_files.append(c_name)
 
254
            return
255
255
        else:
256
 
            ext_modules.append(Extension(module_name, [c_name],
257
 
                define_macros=define_macros, libraries=libraries))
258
 
 
259
 
 
 
256
            source = [c_name]
 
257
    source.extend(extra_source)
 
258
    ext_modules.append(Extension(module_name, source,
 
259
        define_macros=define_macros, libraries=libraries))
 
260
 
 
261
 
 
262
add_pyrex_extension('bzrlib._bencode_pyx')
260
263
add_pyrex_extension('bzrlib._btree_serializer_c')
 
264
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=['z'])
261
265
add_pyrex_extension('bzrlib._chunks_to_lines_pyx')
 
266
add_pyrex_extension('bzrlib._groupcompress_pyx',
 
267
                    extra_source=['bzrlib/diff-delta.c'])
262
268
add_pyrex_extension('bzrlib._knit_load_data_c')
 
269
add_pyrex_extension('bzrlib._rio_pyx')
263
270
if sys.platform == 'win32':
264
271
    add_pyrex_extension('bzrlib._dirstate_helpers_c',
265
272
                        libraries=['Ws2_32'])
597
604
        # TORTOISE_OVERLAYS_MSI_WIN32 must be set to the location of the
598
605
        # TortoiseOverlays MSI installer file. It is in the TSVN svn repo and
599
606
        # can be downloaded from (username=guest, blank password):
600
 
        # http://tortoisesvn.tigris.org/svn/tortoisesvn/TortoiseOverlays/version-1.0.4/bin/TortoiseOverlays-1.0.4.11886-win32.msi
 
607
        # http://tortoisesvn.tigris.org/svn/tortoisesvn/TortoiseOverlays
 
608
        # look for: version-1.0.4/bin/TortoiseOverlays-1.0.4.11886-win32.msi
601
609
        # Ditto for TORTOISE_OVERLAYS_MSI_X64, pointing at *-x64.msi.
602
610
        for needed in ('TORTOISE_OVERLAYS_MSI_WIN32',
603
611
                       'TORTOISE_OVERLAYS_MSI_X64'):
 
612
            url = ('http://guest:@tortoisesvn.tigris.org/svn/tortoisesvn'
 
613
                   '/TortoiseOverlays')
604
614
            if not os.path.isfile(os.environ.get(needed, '<nofile>')):
605
 
                raise RuntimeError("Please set %s to the"
606
 
                                   " location of the relevant TortoiseOverlays"
607
 
                                   " .msi installer file" % needed)
 
615
                raise RuntimeError(
 
616
                    "\nPlease set %s to the location of the relevant"
 
617
                    "\nTortoiseOverlays .msi installer file."
 
618
                    " The installers can be found at"
 
619
                    "\n  %s"
 
620
                    "\ncheck in the version-X.Y.Z/bin/ subdir" % (needed, url))
608
621
        get_tbzr_py2exe_info(includes, excludes, packages, console_targets,
609
622
                             gui_targets, data_files)
610
623
    else: