Ticket #44945: patch-setup.py.diff

File patch-setup.py.diff, 1008 bytes (added by mndavidoff (Monte Davidoff), 10 years ago)
  • setup.py

    old new  
    123123# Check if Cython is installed or not (requisite)
    124124try:
    125125    from Cython.Distutils import build_ext
    126     from Cython.Compiler.Main import Version
     126    from Cython.Compiler.Main import version as cython_version
    127127    cmdclass['build_ext'] = build_ext
    128128except ImportError:
    129129    exit_with_error(
    130130        "You need %(pkgname)s %(pkgver)s or greater to compile PyTables!"
    131131        % {'pkgname': 'Cython', 'pkgver': min_cython_version})
    132132
    133 if Version.version < min_cython_version:
     133if cython_version < min_cython_version:
    134134    exit_with_error(
    135135        "At least Cython %s is needed so as to generate extensions!"
    136136        % (min_cython_version))
    137137else:
    138138    print("* Found %(pkgname)s %(pkgver)s package installed."
    139           % {'pkgname': 'Cython', 'pkgver': Version.version})
     139          % {'pkgname': 'Cython', 'pkgver': cython_version})
    140140
    141141VERSION = open('VERSION').read().strip()
    142142