Skip to content

Commit

Permalink
Fix Windows CI
Browse files Browse the repository at this point in the history
The python install step started failing because there is a new pip
release so we get a warning. I tried to just upgrade python but the
new python manifest depends on functions that need an upgrade of scoop
so I upgraded that as well. Not quite sure which of those upgrades
fixes the issue …

changelog_begin
changelog_end
  • Loading branch information
cocreature committed Apr 21, 2020
1 parent c4f48c9 commit 4b5143d
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 70 deletions.
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
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
5 changes: 4 additions & 1 deletion dev-env/windows/libexec/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ function da_install {
}

da_enable_scoop
$isScoopEnabled = da_is_scoop_installed
# $isScoopEnabled = da_is_scoop_installed
# Temporary because we upgraded scoop so we need to force a reinstall. After all
# machines have been refreshed we can remove this.
$isScoopEnabled = $false
da_reset_path

if ($isScoopEnabled) {
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"
}
}
}

0 comments on commit 4b5143d

Please sign in to comment.