comparison contrib/python-zstandard/make_cffi.py @ 44147:5e84a96d865b

python-zstandard: blacken at 80 characters I made this change upstream and it will make it into the next release of python-zstandard. I figured I'd send it Mercurial's way because it will allow us to drop this directory from the black exclusion list. # skip-blame blackening Differential Revision: https://phab.mercurial-scm.org/D7937
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 22 Jan 2020 22:23:04 -0800
parents de7838053207
children 89a2afe31e82
comparison
equal deleted inserted replaced
44146:45ec64d93b3a 44147:5e84a96d865b
50 ) 50 )
51 ] 51 ]
52 52
53 # Headers whose preprocessed output will be fed into cdef(). 53 # Headers whose preprocessed output will be fed into cdef().
54 HEADERS = [ 54 HEADERS = [
55 os.path.join(HERE, "zstd", *p) for p in (("zstd.h",), ("dictBuilder", "zdict.h"),) 55 os.path.join(HERE, "zstd", *p)
56 for p in (("zstd.h",), ("dictBuilder", "zdict.h"),)
56 ] 57 ]
57 58
58 INCLUDE_DIRS = [ 59 INCLUDE_DIRS = [
59 os.path.join(HERE, d) 60 os.path.join(HERE, d)
60 for d in ( 61 for d in (
137 138
138 try: 139 try:
139 env = dict(os.environ) 140 env = dict(os.environ)
140 if getattr(compiler, "_paths", None): 141 if getattr(compiler, "_paths", None):
141 env["PATH"] = compiler._paths 142 env["PATH"] = compiler._paths
142 process = subprocess.Popen(args + [input_file], stdout=subprocess.PIPE, env=env) 143 process = subprocess.Popen(
144 args + [input_file], stdout=subprocess.PIPE, env=env
145 )
143 output = process.communicate()[0] 146 output = process.communicate()[0]
144 ret = process.poll() 147 ret = process.poll()
145 if ret: 148 if ret:
146 raise Exception("preprocessor exited with error") 149 raise Exception("preprocessor exited with error")
147 150