Fixes #315 py throws error 'Can't find default python'

This commit is contained in:
Simon Hartcher 2015-03-31 17:56:37 +11:00
parent c1d20230f3
commit 93afe910fd
2 changed files with 28 additions and 2 deletions

View File

@ -19,6 +19,25 @@
[ "python.exe", "python3" ]
],
"env_add_path": [ "scripts" ],
"post_install": "python -m ensurepip; cp (gcm pip3).path \"$(split-path (gcm pip3).path)/pip.exe\"",
"post_install": "
python -m ensurepip; cp (gcm pip3).path \"$(split-path (gcm pip3).path)/pip.exe\"
$create_reg = {
param($path, $value)
$reg_base = \"Registry::HKEY_CURRENT_USER\\Software\"
new-item -path \"$reg_base\\$path\" -force | out-null
new-itemproperty -path \"$reg_base\\$path\" `
-name \"(Default)\" -value \"$value\" -force | out-null
}
$create_reg.Invoke(\"Classes\\Python.File\\shell\\open\\command\", `
\"`\"$dir\\py.exe`\" `\"%1`\" %*\")
$create_reg.Invoke(\"Classes\\.py\", \"Python.File\")
$create_reg.Invoke(\"Python\\PythonCore\\3.4\\InstallPath\", `
\"$dir\")
",
"checkver": "<p>Latest: <a href=\".*\">Python ([0-9\\.]+)</a> - <a.*>.*</a></p>"
}

View File

@ -18,6 +18,13 @@
[ "python.exe", "python2" ]
],
"env_add_path": [ "scripts" ],
"post_install": "python2 -m ensurepip",
"post_install": "
python2 -m ensurepip
$reg_path = \"Registry::HKEY_CURRENT_USER\\Software\\Python\\PythonCore\\2.7\\InstallPath\"
new-item -path $reg_path -force | out-null
new-itemproperty -path $reg_path `
-name \"(Default)\" -value \"$dir\" -force | out-null
",
"checkver": "<p>Latest: <a.*>.*</a> - <a href=\".*\">Python ([0-9\\.]+)</a></p>"
}