Improve auto installation for SCons

This commit is contained in:
Ivan Kravets
2015-12-22 18:07:15 +02:00
parent 9b058c3958
commit abdc76aef8
2 changed files with 12 additions and 6 deletions

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
VERSION = (2, 6, 3)
VERSION = (2, 6, "4.dev0")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -364,11 +364,17 @@ def test_scons():
def install_scons():
r = exec_command(["pip", "install", "-U", "scons"])
if r['returncode'] != 0:
r = exec_command(["pip", "install", "--egg", "scons",
'--install-option="--no-install-man"'])
return r['returncode'] == 0
cmds = (
["pip", "install", "-U", "scons"],
["pip", "install", "--egg", "scons",
'--install-option="--no-install-man"'],
["easy_install", "scons"]
)
for cmd in cmds:
r = exec_command(cmd)
if r['returncode'] == 0:
return True
return False
def scons_in_pip():