mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-13 04:01:19 +00:00
Fixes #315 py throws error 'Can't find default python'
This commit is contained in:
parent
c1d20230f3
commit
93afe910fd
21
python.json
21
python.json
@ -19,6 +19,25 @@
|
|||||||
[ "python.exe", "python3" ]
|
[ "python.exe", "python3" ]
|
||||||
],
|
],
|
||||||
"env_add_path": [ "scripts" ],
|
"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>"
|
"checkver": "<p>Latest: <a href=\".*\">Python ([0-9\\.]+)</a> - <a.*>.*</a></p>"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,13 @@
|
|||||||
[ "python.exe", "python2" ]
|
[ "python.exe", "python2" ]
|
||||||
],
|
],
|
||||||
"env_add_path": [ "scripts" ],
|
"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>"
|
"checkver": "<p>Latest: <a.*>.*</a> - <a href=\".*\">Python ([0-9\\.]+)</a></p>"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user