~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
 
106
106
from distutils import log
107
107
from distutils.core import setup
 
108
from distutils.version import LooseVersion
108
109
from distutils.command.install_scripts import install_scripts
109
110
from distutils.command.install_data import install_data
110
111
from distutils.command.build import build
202
203
    from distutils.command.build_ext import build_ext
203
204
else:
204
205
    have_pyrex = True
205
 
    pyrex_version_info = tuple(map(int, pyrex_version.rstrip("+").split('.')))
 
206
    pyrex_version_info = LooseVersion(pyrex_version)
206
207
 
207
208
 
208
209
class build_ext_if_possible(build_ext):
299
300
                        libraries=['Ws2_32'])
300
301
    add_pyrex_extension('bzrlib._walkdirs_win32')
301
302
else:
302
 
    if have_pyrex and pyrex_version_info[:3] == (0,9,4):
 
303
    if have_pyrex and pyrex_version_info == LooseVersion("0.9.4.1"):
303
304
        # Pyrex 0.9.4.1 fails to compile this extension correctly
304
305
        # The code it generates re-uses a "local" pointer and
305
306
        # calls "PY_DECREF" after having set it to NULL. (It mixes PY_XDECREF
317
318
add_pyrex_extension('bzrlib._chk_map_pyx')
318
319
ext_modules.append(Extension('bzrlib._patiencediff_c',
319
320
                             ['bzrlib/_patiencediff_c.c']))
320
 
if have_pyrex and pyrex_version_info < (0, 9, 6, 3):
 
321
if have_pyrex and pyrex_version_info < LooseVersion("0.9.6.3"):
321
322
    print("")
322
323
    print('Your Pyrex/Cython version %s is too old to build the simple_set' % (
323
324
        pyrex_version))
431
432
    # PyQt4 itself still escapes the plugin detection code for some reason...
432
433
    includes.append('PyQt4.QtCore')
433
434
    includes.append('PyQt4.QtGui')
 
435
    includes.append('PyQt4.QtTest')
434
436
    includes.append('sip') # extension module required for Qt.
435
437
    packages.append('pygments') # colorizer for qbzr
436
438
    packages.append('docutils') # html formatting
482
484
    packages.append('sqlite3')
483
485
 
484
486
 
 
487
def get_git_py2exe_info(includes, excludes, packages):
 
488
    packages.append('dulwich')
 
489
 
 
490
 
485
491
def get_fastimport_py2exe_info(includes, excludes, packages):
486
492
    # This is the python-fastimport package, not to be confused with the
487
493
    # bzr-fastimport plugin.
680
686
    if 'svn' in plugins:
681
687
        get_svn_py2exe_info(includes, excludes, packages)
682
688
 
 
689
    if 'git' in plugins:
 
690
        get_git_py2exe_info(includes, excludes, packages)
 
691
 
683
692
    if 'fastimport' in plugins:
684
693
        get_fastimport_py2exe_info(includes, excludes, packages)
685
694