VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/BaseTools/Tests/PythonTest.py@ 101291

最後變更 在這個檔案從101291是 101291,由 vboxsync 提交於 17 月 前

EFI/FirmwareNew: Make edk2-stable202308 build on all supported platforms (using gcc at least, msvc not tested yet), bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 864 位元組
 
1## @file
2# Test whether PYTHON_COMMAND is available and the
3# minimum Python version is installed.
4#
5# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
6# SPDX-License-Identifier: BSD-2-Clause-Patent
7#
8
9import sys
10
11if __name__ == '__main__':
12 # Check if the major and minor versions required were specified.
13 if len(sys.argv) >= 3:
14 req_major_version = int(sys.argv[1])
15 req_minor_version = int(sys.argv[2])
16 else:
17 # If the minimum version wasn't specified on the command line,
18 # default to 3.6 because BaseTools uses syntax from PEP 526
19 # (https://peps.python.org/pep-0526/)
20 req_major_version = 3
21 req_minor_version = 6
22
23 if sys.version_info.major == req_major_version and \
24 sys.version_info.minor >= req_minor_version:
25 sys.exit(0)
26 else:
27 sys.exit(1)
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette