diff --git a/python.json b/python.json index 1acdadee32..cf7edf4e29 100644 --- a/python.json +++ b/python.json @@ -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": "

Latest: Python ([0-9\\.]+) - .*

" } + diff --git a/python27.json b/python27.json index eec8b7c7bc..89c2447f13 100644 --- a/python27.json +++ b/python27.json @@ -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": "

Latest: .* - Python ([0-9\\.]+)

" }