From b6967a996924fc200985264e52e4266594732ff7 Mon Sep 17 00:00:00 2001 From: ivaquero Date: Mon, 4 Nov 2024 16:26:04 +0800 Subject: [PATCH] python37: add 3.7.9 --- bucket/python37.json | 122 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 bucket/python37.json diff --git a/bucket/python37.json b/bucket/python37.json new file mode 100644 index 00000000..2ec8eb9e --- /dev/null +++ b/bucket/python37.json @@ -0,0 +1,122 @@ +{ + "version": "3.7.9", + "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.7.9/python-3.7.9-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:7083fed513c3c9a4ea655211df9ade27", + "27c2d7e74442f356d54d29000379afd55078fb4ede00455fc012f81745e4bcac", + "65a46d5a9fec455b6fbc5d75f8a57cd5ee958d31873ef438766866a53759e9f6" + ] + }, + "32bit": { + "url": [ + "https://www.python.org/ftp/python/3.7.9/python-3.7.9.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:1e6d31c98c68c723541f0821b3c15d52", + "27c2d7e74442f356d54d29000379afd55078fb4ede00455fc012f81745e4bcac", + "65a46d5a9fec455b6fbc5d75f8a57cd5ee958d31873ef438766866a53759e9f6" + ] + } + }, + "pre_install": [ + "$py_root = \"$dir\".Replace('\\', '\\\\')", + "$bit = '64'", + "if ($architecture -eq '32bit') { $bit = '32' }", + "'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', \"$bit\")", + " 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", + "if ($global) {", + " $pathext = (Get-EnvVar -Name PATHEXT -Global) -replace ';.PYW?', ''", + " Set-EnvVar -Name PATHEXT -Value \"$pathext;.PY;.PYW\" -Global", + "}" + ] + }, + "post_install": [ + "python -E -s -m ensurepip -U --default-pip | Out-Null", + "Write-Output \"`e[0m\" # Reset ansi to prevent color leak from installer" + ], + "uninstaller": { + "script": [ + "if ($global) {", + " $pathext = (Get-EnvVar -Name PATHEXT -Global) -replace ';.PYW?', ''", + " Set-EnvVar -Name PATHEXT -Value \"$pathext\" -Global", + "}" + ] + }, + "bin": [ + [ + "python.exe", + "python3" + ], + [ + "python.exe", + "python37" + ], + "Lib\\idlelib\\idle.bat", + [ + "Lib\\idlelib\\idle.bat", + "idle3" + ], + [ + "Lib\\idlelib\\idle.bat", + "idle37" + ] + ], + "env_add_path": [ + "Scripts", + "." + ], + "persist": [ + "Scripts", + "Lib\\site-packages" + ], + "checkver": { + "url": "https://www.python.org/downloads/windows/", + "regex": "python-(3\\.7\\.[\\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" + } + } +}