/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: Robert Collins
  • Date: 2009-05-23 20:57:12 UTC
  • mfrom: (4371 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4441.
  • Revision ID: robertc@robertcollins.net-20090523205712-lcwbfqk6vwavinuv
MergeĀ .dev.

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))
 
256
            source = [c_name]
 
257
    source.extend(extra_source)
 
258
    ext_modules.append(Extension(module_name, source,
 
259
        define_macros=define_macros, libraries=libraries))
258
260
 
259
261
 
260
262
add_pyrex_extension('bzrlib._btree_serializer_c')
 
263
add_pyrex_extension('bzrlib._groupcompress_pyx',
 
264
                    extra_source=['bzrlib/diff-delta.c'])
261
265
add_pyrex_extension('bzrlib._chunks_to_lines_pyx')
262
266
add_pyrex_extension('bzrlib._knit_load_data_c')
 
267
add_pyrex_extension('bzrlib._rio_pyx')
 
268
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=['z'])
263
269
if sys.platform == 'win32':
264
270
    add_pyrex_extension('bzrlib._dirstate_helpers_c',
265
271
                        libraries=['Ws2_32'])
597
603
        # TORTOISE_OVERLAYS_MSI_WIN32 must be set to the location of the
598
604
        # TortoiseOverlays MSI installer file. It is in the TSVN svn repo and
599
605
        # 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
 
606
        # http://tortoisesvn.tigris.org/svn/tortoisesvn/TortoiseOverlays
 
607
        # look for: version-1.0.4/bin/TortoiseOverlays-1.0.4.11886-win32.msi
601
608
        # Ditto for TORTOISE_OVERLAYS_MSI_X64, pointing at *-x64.msi.
602
609
        for needed in ('TORTOISE_OVERLAYS_MSI_WIN32',
603
610
                       'TORTOISE_OVERLAYS_MSI_X64'):
 
611
            url = ('http://guest:@tortoisesvn.tigris.org/svn/tortoisesvn'
 
612
                   '/TortoiseOverlays')
604
613
            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)
 
614
                raise RuntimeError(
 
615
                    "\nPlease set %s to the location of the relevant"
 
616
                    "\nTortoiseOverlays .msi installer file."
 
617
                    " The installers can be found at"
 
618
                    "\n  %s"
 
619
                    "\ncheck in the version-X.Y.Z/bin/ subdir" % (needed, url))
608
620
        get_tbzr_py2exe_info(includes, excludes, packages, console_targets,
609
621
                             gui_targets, data_files)
610
622
    else: