summaryrefslogtreecommitdiff
path: root/numpy/distutils/unixccompiler.py
diff options
context:
space:
mode:
authorSteven Pitman <pitman@ca.ibm.com>2020-10-27 14:13:00 +0000
committerSteven Pitman <pitman@ca.ibm.com>2020-10-27 14:18:41 +0000
commit2dac5ae6be9a4246665306cfebb999d7498c049b (patch)
tree474fa39026f5ff475b16e8469f16510bd17f10ea /numpy/distutils/unixccompiler.py
parent723a92e463112b1163e5adb071644506a24027f4 (diff)
downloadnumpy-2dac5ae6be9a4246665306cfebb999d7498c049b.tar.gz
BLD: Fix installing Numpy on z/OS
Diffstat (limited to 'numpy/distutils/unixccompiler.py')
-rw-r--r--numpy/distutils/unixccompiler.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py
index 9bb7251d8..0cd2d243e 100644
--- a/numpy/distutils/unixccompiler.py
+++ b/numpy/distutils/unixccompiler.py
@@ -3,6 +3,8 @@ unixccompiler - can handle very long argument lists for ar.
"""
import os
+import sys
+import subprocess
from distutils.errors import CompileError, DistutilsExecError, LibError
from distutils.unixccompiler import UnixCCompiler
@@ -56,6 +58,11 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts
# add commandline flags to dependency file
if deps:
+ # After running the compiler, the file created will be in EBCDIC
+ # but will not be tagged as such. This tags it so the file does not
+ # have multiple different encodings being written to it
+ if sys.platform == 'zos':
+ subprocess.check_output(['chtag', '-tc', 'IBM1047', obj + '.d'])
with open(obj + '.d', 'a') as f:
f.write(_commandline_dep_string(cc_args, extra_postargs, pp_opts))