~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Vincent Ladeuil
  • Date: 2017-01-30 14:30:10 UTC
  • mfrom: (6615.3.7 merges)
  • mto: This revision was merged to the branch mainline in revision 6621.
  • Revision ID: v.ladeuil+lp@free.fr-20170130143010-p31t1ranfeqbaeki
Merge  2.7 into trunk including fix for bug #1657238

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