Mercurial > hg
comparison contrib/python-zstandard/setup.py @ 30822:b54a2984cdd4
zstd: vendor python-zstandard 0.6.0
Commit 63c68d6f5fc8de4afd9bde81b13b537beb4e47e8 from
https://github.com/indygreg/python-zstandard is imported without
modifications (other than removing unwanted files).
This includes minor performance and feature improvements. It also
changes the vendored zstd library from 1.1.1 to 1.1.2.
# no-check-commit
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 14 Jan 2017 19:41:43 -0800 |
parents | b86a448a2965 |
children | c32454d69b85 |
comparison
equal
deleted
inserted
replaced
30821:7005c03f7387 | 30822:b54a2984cdd4 |
---|---|
3 # All rights reserved. | 3 # All rights reserved. |
4 # | 4 # |
5 # This software may be modified and distributed under the terms | 5 # This software may be modified and distributed under the terms |
6 # of the BSD license. See the LICENSE file for details. | 6 # of the BSD license. See the LICENSE file for details. |
7 | 7 |
8 import sys | |
8 from setuptools import setup | 9 from setuptools import setup |
9 | 10 |
10 try: | 11 try: |
11 import cffi | 12 import cffi |
12 except ImportError: | 13 except ImportError: |
13 cffi = None | 14 cffi = None |
14 | 15 |
15 import setup_zstd | 16 import setup_zstd |
16 | 17 |
18 SUPPORT_LEGACY = False | |
19 | |
20 if "--legacy" in sys.argv: | |
21 SUPPORT_LEGACY = True | |
22 sys.argv.remove("--legacy") | |
23 | |
17 # 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 |
18 # facilitate reuse in other projects. | 25 # facilitate reuse in other projects. |
19 extensions = [setup_zstd.get_c_extension()] | 26 extensions = [setup_zstd.get_c_extension(SUPPORT_LEGACY, 'zstd')] |
20 | 27 |
21 if cffi: | 28 if cffi: |
22 import make_cffi | 29 import make_cffi |
23 extensions.append(make_cffi.ffi.distutils_extension()) | 30 extensions.append(make_cffi.ffi.distutils_extension()) |
24 | 31 |