python: Use .reg files from bucket folder

This commit is contained in:
Rashil Gandhi 2022-02-10 13:22:19 +05:30 committed by GitHub
parent 2b5d8ca324
commit 18fcae3462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,28 +6,12 @@
"notes": "Allow applications and third-party installers to find python by running: \"$dir\\install-pep-514.reg\"", "notes": "Allow applications and third-party installers to find python by running: \"$dir\\install-pep-514.reg\"",
"architecture": { "architecture": {
"64bit": { "64bit": {
"url": [ "url": "https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe#/setup.exe",
"https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe#/setup.exe", "hash": "md5:2b4fd1ed6e736f0e65572da64c17e020"
"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:2b4fd1ed6e736f0e65572da64c17e020",
"c2611c8010979a47cdeea1af17d5061d8df40c5356fd8c2f3ba9492d516a99d1",
"d9309423b693ed63aea6b1fbfc0c34f16842cdca22a1b3edef283b87567a53b9"
]
}, },
"32bit": { "32bit": {
"url": [ "url": "https://www.python.org/ftp/python/3.10.2/python-3.10.2.exe#/setup.exe",
"https://www.python.org/ftp/python/3.10.2/python-3.10.2.exe#/setup.exe", "hash": "md5:ef91f4e873280d37eb5bc26e7b18d3d1"
"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:ef91f4e873280d37eb5bc26e7b18d3d1",
"c2611c8010979a47cdeea1af17d5061d8df40c5356fd8c2f3ba9492d516a99d1",
"d9309423b693ed63aea6b1fbfc0c34f16842cdca22a1b3edef283b87567a53b9"
]
} }
}, },
"pre_install": [ "pre_install": [
@ -36,7 +20,7 @@
"if ($architecture -eq '32bit') { $bit = '32' }", "if ($architecture -eq '32bit') { $bit = '32' }",
"'install-pep-514.reg', 'uninstall-pep-514.reg' | ForEach-Object {", "'install-pep-514.reg', 'uninstall-pep-514.reg' | ForEach-Object {",
" $py_version = ($version -split '\\.')[0..1] -join '.'", " $py_version = ($version -split '\\.')[0..1] -join '.'",
" $content = Get-Content \"$dir\\$_\"", " $content = Get-Content \"$bucketsdir\\main\\scripts\\python\\$_\"",
" $content = $content.Replace('$py_root', $py_root)", " $content = $content.Replace('$py_root', $py_root)",
" $content = $content.Replace('$py_version', $py_version)", " $content = $content.Replace('$py_version', $py_version)",
" $content = $content.Replace('$py_fullversion', $version)", " $content = $content.Replace('$py_fullversion', $version)",