HUMORCE 6385da9783
python: Full PEP514 registration (#2688)
* python: Update registration

* python: Update 'pre_instasll' for PEP514

* python: Update hash (install-pep-514.reg)
2021-09-18 20:03:06 +08:00

127 lines
5.5 KiB
JSON

{
"version": "3.9.7",
"description": "A programming language that lets you work quickly and integrate systems more effectively.",
"homepage": "https://www.python.org/",
"license": "Python-2.0",
"notes": "Allow applications and third-party installers to find python by running: \"$dir\\install-pep-514.reg\"",
"architecture": {
"64bit": {
"url": [
"https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe#/setup.exe",
"https://raw.githubusercontent.com/ScoopInstaller/Main/master/scripts/python/install-pep-514.reg",
"https://raw.githubusercontent.com/ScoopInstaller/Main/master/scripts/python/uninstall-pep-514.reg"
],
"hash": [
"md5:cc3eabc1f9d6c703d1d2a4e7c041bc1d",
"c2611c8010979a47cdeea1af17d5061d8df40c5356fd8c2f3ba9492d516a99d1",
"d9309423b693ed63aea6b1fbfc0c34f16842cdca22a1b3edef283b87567a53b9"
],
"pre_install": [
"$py_root = \"$dir\".Replace('\\', '\\\\')",
"'install-pep-514.reg', 'uninstall-pep-514.reg' | ForEach-Object {",
" $py_version = ($version -split '\\.')[0..1] -join '.'",
" $content = Get-Content \"$dir\\$_\"",
" $content = $content.Replace('$py_root', $py_root)",
" $content = $content.Replace('$py_version', $py_version)",
" $content = $content.Replace('$py_fullversion', $version)",
" $content = $content.Replace('$py_cleanVersion', $version -replace '\\.')",
" $content = $content.Replace('$py_arch', \"64\")",
" if ($global) {",
" $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE')",
" }",
" Set-Content \"$dir\\$_\" $content -Encoding Ascii",
"}"
]
},
"32bit": {
"url": [
"https://www.python.org/ftp/python/3.9.7/python-3.9.7.exe#/setup.exe",
"https://raw.githubusercontent.com/ScoopInstaller/Main/master/scripts/python/install-pep-514.reg",
"https://raw.githubusercontent.com/ScoopInstaller/Main/master/scripts/python/uninstall-pep-514.reg"
],
"hash": [
"md5:0d949bdfdbd0c8c66107a980a95efd85",
"c2611c8010979a47cdeea1af17d5061d8df40c5356fd8c2f3ba9492d516a99d1",
"d9309423b693ed63aea6b1fbfc0c34f16842cdca22a1b3edef283b87567a53b9"
],
"pre_install": [
"$py_root = \"$dir\".Replace('\\', '\\\\')",
"'install-pep-514.reg', 'uninstall-pep-514.reg' | ForEach-Object {",
" $py_version = ($version -split '\\.')[0..1] -join '.'",
" $content = Get-Content \"$dir\\$_\"",
" $content = $content.Replace('$py_root', $py_root)",
" $content = $content.Replace('$py_version', $py_version)",
" $content = $content.Replace('$py_fullversion', $version)",
" $content = $content.Replace('$py_cleanVersion', $version -replace '\\.')",
" $content = $content.Replace('$py_arch', \"32\")",
" if ($global) {",
" $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE')",
" }",
" Set-Content \"$dir\\$_\" $content -Encoding Ascii",
"}"
]
}
},
"installer": {
"script": [
"Expand-DarkArchive \"$dir\\setup.exe\" \"$dir\\_tmp\"",
"@('path.msi', 'pip.msi') | ForEach-Object {",
" Remove-Item \"$dir\\_tmp\\AttachedContainer\\$_\"",
"}",
"(Get-ChildItem \"$dir\\_tmp\\AttachedContainer\\*.msi\").FullName | ForEach-Object { Expand-MsiArchive $_ \"$dir\" }",
"Remove-Item \"$dir\\_tmp\", \"$dir\\setup.exe\" -Force -Recurse",
"& \"$dir\\python.exe\" -E -s -m ensurepip -U --default-pip | Out-Null",
"Write-Output \"`e[0m\" # Reset ansi to prevent color leak from installer",
"if ($global) {",
" $pathext = (env 'PATHEXT' $true) -replace ';.PYW?', ''",
" env 'PATHEXT' $true \"$pathext;.PY;.PYW\"",
"}"
]
},
"uninstaller": {
"script": [
"if ($global) {",
" $pathext = (env 'PATHEXT' $true) -replace ';.PYW?', ''",
" env 'PATHEXT' $true \"$pathext\"",
"}"
]
},
"bin": [
[
"python.exe",
"python3"
],
"Lib\\idlelib\\idle.bat",
[
"Lib\\idlelib\\idle.bat",
"idle3"
]
],
"env_add_path": [
"Scripts",
"."
],
"persist": [
"Scripts",
"Lib\\site-packages"
],
"checkver": {
"url": "https://www.python.org/downloads/windows/",
"regex": "Latest Python 3 Release - Python ([\\d.]+)"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://www.python.org/ftp/python/$version/python-$version-amd64.exe#/setup.exe"
},
"32bit": {
"url": "https://www.python.org/ftp/python/$version/python-$version.exe#/setup.exe"
}
},
"hash": {
"url": "https://www.python.org/downloads/release/python-$cleanVersion/",
"regex": "(?sm)$basename.*?$md5"
}
}
}