contrib/python-zstandard/setup.py
changeset 31796 e0dc40530c5a
parent 30895 c32454d69b85
child 37495 b1fb341d8a61
equal deleted inserted replaced
31795:2b130e26c3a4 31796:e0dc40530c5a
    23 
    23 
    24 # Code for obtaining the Extension instance is in its own module to
    24 # Code for obtaining the Extension instance is in its own module to
    25 # facilitate reuse in other projects.
    25 # facilitate reuse in other projects.
    26 extensions = [setup_zstd.get_c_extension(SUPPORT_LEGACY, 'zstd')]
    26 extensions = [setup_zstd.get_c_extension(SUPPORT_LEGACY, 'zstd')]
    27 
    27 
       
    28 install_requires = []
       
    29 
    28 if cffi:
    30 if cffi:
    29     import make_cffi
    31     import make_cffi
    30     extensions.append(make_cffi.ffi.distutils_extension())
    32     extensions.append(make_cffi.ffi.distutils_extension())
       
    33 
       
    34     # Need change in 1.8 for ffi.from_buffer() behavior.
       
    35     install_requires.append('cffi>=1.8')
    31 
    36 
    32 version = None
    37 version = None
    33 
    38 
    34 with open('c-ext/python-zstandard.h', 'r') as fh:
    39 with open('c-ext/python-zstandard.h', 'r') as fh:
    35     for line in fh:
    40     for line in fh:
    65         'Programming Language :: Python :: 3.6',
    70         'Programming Language :: Python :: 3.6',
    66     ],
    71     ],
    67     keywords='zstandard zstd compression',
    72     keywords='zstandard zstd compression',
    68     ext_modules=extensions,
    73     ext_modules=extensions,
    69     test_suite='tests',
    74     test_suite='tests',
       
    75     install_requires=install_requires,
    70 )
    76 )