@@ -66,7 +66,11 @@ def _python_repository_impl(rctx):
66
66
working_directory = working_directory ,
67
67
)
68
68
if make_result .return_code :
69
- fail (make_result .stderr )
69
+ fail_msg = (
70
+ "Failed to compile 'zstd' from source for use in Python interpreter extraction. " +
71
+ "'make' error message: {}" .format (make_result .stderr )
72
+ )
73
+ fail (fail_msg )
70
74
zstd = "{working_directory}/zstd" .format (working_directory = working_directory )
71
75
unzstd = "./unzstd"
72
76
rctx .symlink (zstd , unzstd )
@@ -79,7 +83,11 @@ def _python_repository_impl(rctx):
79
83
"--file={}" .format (release_filename ),
80
84
])
81
85
if exec_result .return_code :
82
- fail (exec_result .stderr )
86
+ fail_msg = (
87
+ "Failed to extract Python interpreter from '{}'. " .format (release_filename ) +
88
+ "'tar' error message: {}" .format (exec_result .stderr )
89
+ )
90
+ fail (fail_msg )
83
91
else :
84
92
rctx .download_and_extract (
85
93
url = url ,
@@ -101,7 +109,10 @@ def _python_repository_impl(rctx):
101
109
if "windows" not in rctx .os .name :
102
110
exec_result = rctx .execute (["chmod" , "-R" , "ugo-w" , "lib" ])
103
111
if exec_result .return_code :
104
- fail (exec_result .stderr )
112
+ fail_msg = "Failed to make interpreter installation read-only. 'chmod' error msg: {}" .format (
113
+ exec_result .stderr ,
114
+ )
115
+ fail (fail_msg )
105
116
106
117
python_bin = "python.exe" if ("windows" in platform ) else "bin/python3"
107
118
0 commit comments