Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport scoop fix from master #5672

Merged
merged 1 commit into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dadew
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"vcredist-14.0.23026",
"bazel",
"nodejs-10.16.3",
"python-3.6.7",
"python-3.8.2",
"nsis-3.04",
"maven-3.6.1",
"stack"
Expand Down
3 changes: 3 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'

# See https://github.com/lukesampson/scoop/issues/3859
Set-Strictmode -Off
.\dev-env\windows\bin\dadew.ps1 install
Set-StrictMode -Version latest
.\dev-env\windows\bin\dadew.ps1 sync
.\dev-env\windows\bin\dadew.ps1 enable

Expand Down
7 changes: 4 additions & 3 deletions dev-env/windows/libexec/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ function da_auto_prevent_update {
}

function da_clear_buckets {
Remove-Item $scoopInstallDir\apps\scoop\current\bucket\* -r -force
Remove-Item $scoopInstallDir\buckets\dadew -r -force -ErrorAction Ignore
New-Item $scoopInstallDir\buckets\dadew -ItemType "directory" -Force
}

function da_sync_buckets([String] $Directory) {
da_clear_buckets
$files = Get-ChildItem $Directory | Where-Object {$_.Name -like '*.json'}
ForEach ($file in $files) {
Get-Content "$Directory\$file" | Set-Content "$scoopInstallDir\apps\scoop\current\bucket\$file"
Get-Content "$Directory\$file" | Set-Content "$scoopInstallDir\buckets\dadew\$file"
}
}

Expand Down Expand Up @@ -134,7 +135,7 @@ function da_install_all([String] $Directory) {
$installedSha = (Get-FileHash $scoopInstallDir\apps\$app\current\manifest.json).Hash
}

$availableSha = (Get-FileHash $scoopInstallDir\apps\scoop\current\bucket\$app.json).Hash
$availableSha = (Get-FileHash $scoopInstallDir\buckets\dadew\$app.json).Hash

If ($installedSha -eq $availableSha) {
da_success "<< ok"
Expand Down
4 changes: 2 additions & 2 deletions dev-env/windows/libexec/init.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$scoopUrl = 'https://github.com/lukesampson/scoop/archive/b819876ec373cfadc1fc490b56340dec73dc6eb5.zip'
$scoopUrl = 'https://github.com/lukesampson/scoop/archive/a9fa775d59b14e7dce335313faa0eff855469764.zip'

$scoopTmpDir = "$env:Temp\scoop"
$scoopTmp = "$scoopTmpDir\scoop.zip"
$scoopMaster = "$scoopTmpDir\scoop-b819876ec373cfadc1fc490b56340dec73dc6eb5"
$scoopMaster = "$scoopTmpDir\scoop-a9fa775d59b14e7dce335313faa0eff855469764"
$scoopCore = "$scoopMaster\lib\core.ps1"
$dadewInstallDir = $env:DADEW, "$env:USERPROFILE\dadew" | Select-Object -first 1
$scoopInstallDir = "$dadewInstallDir\scoop"
Expand Down
63 changes: 0 additions & 63 deletions dev-env/windows/manifests/python-3.6.7.json

This file was deleted.

104 changes: 104 additions & 0 deletions dev-env/windows/manifests/python-3.8.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"homepage": "https://www.python.org/",
"description": "A programming language that lets you work quickly and integrate systems more effectively.",
"license": "Python-2.0",
"version": "3.8.2",
"notes": "Allow applications and third-party installers to find python by running: \"$dir\\install-pep-514.reg\"",
"architecture": {
"64bit": {
"url": [
"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",
"https://www.python.org/ftp/python/3.8.2/python-3.8.2-amd64.exe"
],
"hash": [
"5d9d7a604c057e67973e1d4b3b488ae20a0e5ee5496d03b5cf091410e33e39ed",
"d9309423b693ed63aea6b1fbfc0c34f16842cdca22a1b3edef283b87567a53b9",
"8e400e3f32cdcb746e62e0db4d3ae4cba1f927141ebc4d0d5a4006b0daee8921"
]
},
"32bit": {
"url": [
"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",
"https://www.python.org/ftp/python/3.8.2/python-3.8.2.exe"
],
"hash": [
"5d9d7a604c057e67973e1d4b3b488ae20a0e5ee5496d03b5cf091410e33e39ed",
"d9309423b693ed63aea6b1fbfc0c34f16842cdca22a1b3edef283b87567a53b9",
"03ac5754a69c9c11c08d1f4d694c14625a4d27348ad4dd2d1253e2547819db2c"
]
}
},
"pre_install": [
"'install-pep-514.reg', 'uninstall-pep-514.reg' | ForEach-Object {",
" $py_root = \"$dir\".Replace('\\', '\\\\')",
" $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)",
" if ($global) {",
" $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE')",
" }",
" Set-Content \"$dir\\$_\" $content -Encoding Ascii",
"}"
],
"installer": {
"script": [
"Expand-DarkArchive \"$dir\\$fname\" \"$dir\\_tmp\"",
"@('launcher.msi', '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\\$fname\" -Force -Recurse",
"& \"$dir\\python.exe\" -E -s -m ensurepip -U --default-pip | Out-Null",
"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",
"pythonw.exe",
[
"python.exe",
"python3"
],
"Lib\\idlelib\\idle.bat",
[
"Lib\\idlelib\\idle.bat",
"idle3"
]
],
"env_add_path": [
"Scripts",
"."
],
"checkver": {
"url": "https://www.python.org/downloads/windows/",
"re": "Latest Python 3 Release - Python ([\\d\\.]+)"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://www.python.org/ftp/python/$version/python-$version-amd64.exe"
},
"32bit": {
"url": "https://www.python.org/ftp/python/$version/python-$version.exe"
}
},
"hash": {
"url": "https://www.python.org/downloads/release/python-$cleanVersion/",
"find": "(?sm)$basename.*?$md5"
}
}
}