~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-08 14:37:25 UTC
  • mfrom: (4516 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4517.
  • Revision ID: john@arbash-meinel.com-20090708143725-sc9sjy3mz4cxwxzz
Merge bzr.dev 4516

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
    def run(self):
149
149
        build.run(self)
150
150
 
151
 
        import generate_docs
 
151
        from tools import generate_docs
152
152
        generate_docs.main(argv=["bzr", "man"])
153
153
 
154
154
 
242
242
    c_name = path + '.c'
243
243
    define_macros = []
244
244
    if sys.platform == 'win32':
245
 
        # pyrex uses the macro WIN32 to detect the platform, even though it should
246
 
        # be using something like _WIN32 or MS_WINDOWS, oh well, we can give it the
247
 
        # right value.
 
245
        # pyrex uses the macro WIN32 to detect the platform, even though it
 
246
        # should be using something like _WIN32 or MS_WINDOWS, oh well, we can
 
247
        # give it the right value.
248
248
        define_macros.append(('WIN32', None))
249
249
    if have_pyrex:
250
250
        source = [pyrex_name]
259
259
        define_macros=define_macros, libraries=libraries))
260
260
 
261
261
 
262
 
add_pyrex_extension('bzrlib._btree_serializer_c')
 
262
add_pyrex_extension('bzrlib._bencode_pyx')
 
263
add_pyrex_extension('bzrlib._btree_serializer_pyx')
 
264
add_pyrex_extension('bzrlib._chunks_to_lines_pyx')
263
265
add_pyrex_extension('bzrlib._groupcompress_pyx',
264
266
                    extra_source=['bzrlib/diff-delta.c'])
265
 
add_pyrex_extension('bzrlib._chunks_to_lines_pyx')
266
 
add_pyrex_extension('bzrlib._knit_load_data_c')
 
267
add_pyrex_extension('bzrlib._knit_load_data_pyx')
 
268
add_pyrex_extension('bzrlib._known_graph_pyx')
267
269
add_pyrex_extension('bzrlib._rio_pyx')
268
 
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=['z'])
269
270
if sys.platform == 'win32':
270
 
    add_pyrex_extension('bzrlib._dirstate_helpers_c',
 
271
    add_pyrex_extension('bzrlib._dirstate_helpers_pyx',
271
272
                        libraries=['Ws2_32'])
272
273
    add_pyrex_extension('bzrlib._walkdirs_win32')
 
274
    z_lib = 'zdll'
273
275
else:
274
276
    if have_pyrex and pyrex_version == '0.9.4.1':
275
277
        # Pyrex 0.9.4.1 fails to compile this extension correctly
276
278
        # The code it generates re-uses a "local" pointer and
277
279
        # calls "PY_DECREF" after having set it to NULL. (It mixes PY_XDECREF
278
280
        # which is NULL safe with PY_DECREF which is not.)
279
 
        print 'Cannot build extension "bzrlib._dirstate_helpers_c" using'
 
281
        print 'Cannot build extension "bzrlib._dirstate_helpers_pyx" using'
280
282
        print 'your version of pyrex "%s". Please upgrade your pyrex' % (
281
283
            pyrex_version,)
282
284
        print 'install. For now, the non-compiled (python) version will'
283
285
        print 'be used instead.'
284
286
    else:
285
 
        add_pyrex_extension('bzrlib._dirstate_helpers_c')
 
287
        add_pyrex_extension('bzrlib._dirstate_helpers_pyx')
286
288
    add_pyrex_extension('bzrlib._readdir_pyx')
287
 
ext_modules.append(Extension('bzrlib._patiencediff_c', ['bzrlib/_patiencediff_c.c']))
 
289
    z_lib = 'z'
 
290
add_pyrex_extension('bzrlib._chk_map_pyx', libraries=[z_lib])
 
291
ext_modules.append(Extension('bzrlib._patiencediff_c',
 
292
                             ['bzrlib/_patiencediff_c.c']))
288
293
 
289
294
 
290
295
if unavailable_files:
532
537
                  ImaginaryModule cElementTree elementtree.ElementTree
533
538
                  Crypto.PublicKey._fastmath
534
539
                  medusa medusa.filesys medusa.ftp_server
535
 
                  tools tools.doc_generate
 
540
                  tools
536
541
                  resource validate""".split()
537
542
    dll_excludes = []
538
543
 
651
656
    # ad-hoc for easy_install
652
657
    DATA_FILES = []
653
658
    if not 'bdist_egg' in sys.argv:
654
 
        # generate and install bzr.1 only with plain install, not easy_install one
 
659
        # generate and install bzr.1 only with plain install, not the
 
660
        # easy_install one
655
661
        DATA_FILES = [('man/man1', ['bzr.1'])]
656
662
 
657
663
    # std setup