forked from platformio/platformio-core
Add requirements for Python and PIO Core+
This commit is contained in:
@ -32,9 +32,9 @@ __copyright__ = "Copyright 2014-present PlatformIO"
|
|||||||
|
|
||||||
__apiurl__ = "https://api.platformio.org"
|
__apiurl__ = "https://api.platformio.org"
|
||||||
|
|
||||||
if sys.version_info < (2, 7, 4) or sys.version_info >= (3, 0, 0):
|
if sys.version_info < (2, 7, 0) or sys.version_info >= (3, 0, 0):
|
||||||
msg = ("PlatformIO version %s does not run under Python version %s.\n"
|
msg = ("PlatformIO Core v%s does not run under Python version %s.\n"
|
||||||
"Minimum supported version is 2.7.4, please upgrade Python. \n"
|
"Minimum supported version is 2.7, please upgrade Python.\n"
|
||||||
"Python 3 is not yet supported.\n")
|
"Python 3 is not yet supported.\n")
|
||||||
sys.stderr.write(msg % (__version__, sys.version.split()[0]))
|
sys.stderr.write(msg % (__version__, sys.version.split()[0]))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -17,7 +17,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
|
||||||
from platformio import exception, util
|
from platformio import __version__, exception, util
|
||||||
from platformio.managers.package import PackageManager
|
from platformio.managers.package import PackageManager
|
||||||
|
|
||||||
CORE_PACKAGES = {
|
CORE_PACKAGES = {
|
||||||
@ -63,6 +63,13 @@ def update_core_packages(only_check=False, silent=False):
|
|||||||
|
|
||||||
|
|
||||||
def pioplus_call(args, **kwargs):
|
def pioplus_call(args, **kwargs):
|
||||||
|
if "windows" in util.get_systype() and sys.version_info < (2, 7, 6):
|
||||||
|
raise exception.PlatformioException(
|
||||||
|
"PlatformIO Core Plus v%s does not run under Python version %s.\n"
|
||||||
|
"Minimum supported version is 2.7.6, please upgrade Python.\n"
|
||||||
|
"Python 3 is not yet supported.\n" % (__version__,
|
||||||
|
sys.version.split()[0]))
|
||||||
|
|
||||||
pioplus_path = join(get_core_package_dir("tool-pioplus"), "pioplus")
|
pioplus_path = join(get_core_package_dir("tool-pioplus"), "pioplus")
|
||||||
os.environ['PYTHONEXEPATH'] = util.get_pythonexe_path()
|
os.environ['PYTHONEXEPATH'] = util.get_pythonexe_path()
|
||||||
os.environ['PYTHONPYSITEDIR'] = get_core_package_dir("pysite-pioplus")
|
os.environ['PYTHONPYSITEDIR'] = get_core_package_dir("pysite-pioplus")
|
||||||
|
Reference in New Issue
Block a user