/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

Don't use cython if it's too old.

Merged from https://code.launchpad.net/~jelmer/brz/cython-version/+merge/363703

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
    print("")
219
219
    from distutils.command.build_ext import build_ext
220
220
else:
221
 
    have_cython = True
 
221
    minimum_cython_version = '0.29'
222
222
    cython_version_info = LooseVersion(cython_version)
 
223
    if cython_version_info < LooseVersion(minimum_cython_version):
 
224
        print("Version of Cython is too old. "
 
225
              "Current is %s, need at least %s."
 
226
              % (cython_version, minimum_cython_version))
 
227
        print("If the .c files are available, they will be built,"
 
228
              " but modifying the .pyx files will not rebuild them.")
 
229
        have_cython = False
 
230
    else:
 
231
        have_cython = True
223
232
 
224
233
 
225
234
class build_ext_if_possible(build_ext):