comparison contrib/python-zstandard/make_cffi.py @ 42937:69de49c4e39c

zstandard: vendor python-zstandard 0.12 The upstream source distribution from PyPI was extracted. Unwanted files were removed. The clang-format ignore list was updated to reflect the new source of files. test-repo-compengines.t was updated to reflect a change in behavior of the zstd library. The project contains a vendored copy of zstandard 1.4.3. The old version was 1.3.8. This should result in some minor performance wins. # no-check-commit because 3rd party code has different style guidelines Differential Revision: https://phab.mercurial-scm.org/D6858
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 15 Sep 2019 20:04:00 -0700
parents 675775c33ab6
children de7838053207
comparison
equal deleted inserted replaced
42936:2da754532dd3 42937:69de49c4e39c
27 'common/zstd_common.c', 27 'common/zstd_common.c',
28 'compress/fse_compress.c', 28 'compress/fse_compress.c',
29 'compress/hist.c', 29 'compress/hist.c',
30 'compress/huf_compress.c', 30 'compress/huf_compress.c',
31 'compress/zstd_compress.c', 31 'compress/zstd_compress.c',
32 'compress/zstd_compress_literals.c',
33 'compress/zstd_compress_sequences.c',
32 'compress/zstd_double_fast.c', 34 'compress/zstd_double_fast.c',
33 'compress/zstd_fast.c', 35 'compress/zstd_fast.c',
34 'compress/zstd_lazy.c', 36 'compress/zstd_lazy.c',
35 'compress/zstd_ldm.c', 37 'compress/zstd_ldm.c',
36 'compress/zstd_opt.c', 38 'compress/zstd_opt.c',
117 fd, input_file = tempfile.mkstemp(suffix='.h') 119 fd, input_file = tempfile.mkstemp(suffix='.h')
118 os.write(fd, b''.join(lines)) 120 os.write(fd, b''.join(lines))
119 os.close(fd) 121 os.close(fd)
120 122
121 try: 123 try:
122 process = subprocess.Popen(args + [input_file], stdout=subprocess.PIPE) 124 env = dict(os.environ)
125 if getattr(compiler, '_paths', None):
126 env['PATH'] = compiler._paths
127 process = subprocess.Popen(args + [input_file], stdout=subprocess.PIPE,
128 env=env)
123 output = process.communicate()[0] 129 output = process.communicate()[0]
124 ret = process.poll() 130 ret = process.poll()
125 if ret: 131 if ret:
126 raise Exception('preprocessor exited with error') 132 raise Exception('preprocessor exited with error')
127 133