Skip to content

Commit 52d8677

Browse files
authored
Implement LZMA support check
1 parent 1cfee8e commit 52d8677

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

platform.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# LZMA support check
16+
try:
17+
import lzma as _lzma
18+
except ImportError:
19+
import sys
20+
print("ERROR: Python's lzma module is unavailable or broken in this interpreter.", file=sys.stderr)
21+
print("LZMA (liblzma) support is required for tool/toolchain installation.", file=sys.stderr)
22+
print("Please install Python built with LZMA support.", file=sys.stderr)
23+
raise SystemExit(1)
24+
else:
25+
# Keep namespace clean
26+
del _lzma
27+
1528
import fnmatch
1629
import os
1730
import json

0 commit comments

Comments
 (0)