mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 10:54:27 +02:00
Fix issue with `platformio init --ide
` command for Python 2.6
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@
|
|||||||
docs/_build
|
docs/_build
|
||||||
dist
|
dist
|
||||||
build
|
build
|
||||||
|
.cache
|
||||||
|
@@ -4,6 +4,11 @@ Release Notes
|
|||||||
PlatformIO 2.0
|
PlatformIO 2.0
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
2.10.4 (2016-06-??)
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Fixed issue with ``platformio init --ide`` command for Python 2.6
|
||||||
|
|
||||||
2.10.3 (2016-06-15)
|
2.10.3 (2016-06-15)
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
VERSION = (2, 10, 3)
|
VERSION = (2, 10, "4.dev0")
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@@ -52,6 +52,8 @@ def cli():
|
|||||||
r = None
|
r = None
|
||||||
try:
|
try:
|
||||||
for cmd in cmds:
|
for cmd in cmds:
|
||||||
|
if sys.version_info < (2, 7, 0):
|
||||||
|
cmd[0] += ".__main__"
|
||||||
cmd = [os.path.normpath(sys.executable), "-m"] + cmd
|
cmd = [os.path.normpath(sys.executable), "-m"] + cmd
|
||||||
r = None
|
r = None
|
||||||
r = util.exec_command(cmd)
|
r = util.exec_command(cmd)
|
||||||
|
@@ -66,7 +66,12 @@ class ProjectGenerator(object):
|
|||||||
envdata = self.get_project_env()
|
envdata = self.get_project_env()
|
||||||
if "env_name" not in envdata:
|
if "env_name" not in envdata:
|
||||||
return data
|
return data
|
||||||
cmd = [normpath(sys.executable), "-m", "platformio", "-f"]
|
cmd = [
|
||||||
|
normpath(sys.executable), "-m",
|
||||||
|
"platformio" + (
|
||||||
|
".__main__" if sys.version_info < (2, 7, 0) else ""),
|
||||||
|
"-f"
|
||||||
|
]
|
||||||
if app.get_session_var("caller_id"):
|
if app.get_session_var("caller_id"):
|
||||||
cmd.extend(["-c", app.get_session_var("caller_id")])
|
cmd.extend(["-c", app.get_session_var("caller_id")])
|
||||||
cmd.extend(["run", "-t", "idedata", "-e", envdata['env_name']])
|
cmd.extend(["run", "-t", "idedata", "-e", envdata['env_name']])
|
||||||
|
Reference in New Issue
Block a user