comparison contrib/python-zstandard/setup.py @ 31796:e0dc40530c5a

zstd: vendor python-zstandard 0.8.0 Commit 81e1f5bbf1fc54808649562d3ed829730765c540 from https://github.com/indygreg/python-zstandard is imported without modifications (other than removing unwanted files). Updates relevant to Mercurial include: * Support for multi-threaded compression (we can use this for bundle and wire protocol compression). * APIs for batch compression and decompression operations using multiple threads and optimal memory allocation mechanism. (Can be useful for revlog perf improvements.) * A ``BufferWithSegments`` type that models a single memory buffer containing N discrete items of known lengths. This type can be used for very efficient 0-copy data operations. # no-check-commit
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 01 Apr 2017 15:24:03 -0700
parents c32454d69b85
children b1fb341d8a61
comparison
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 )