Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/build_test_cbsinit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os: ['windows-2022']
cbsinit_repo: ['https://github.com/cloudbase/cloudbase-init']
cbsinit_branch: ['master']
python_version: ['3.13_13']
python_version: ['3.14_4']
platform: ['x64']
cloud: [openstack]

Expand Down
2 changes: 1 addition & 1 deletion BuildAutomation/BuildCloudbaseInitSetup.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Param(
[string]$platform = "x64",
[string]$pythonversion = "3.13_13",
[string]$pythonversion = "3.14_4",
[string]$SignX509Thumbprint = $null,
[string]$release = $null,
# Cloudbase-Init repo details
Expand Down
68 changes: 65 additions & 3 deletions BuildAutomation/BuildUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,70 @@ function ImportCertificateUser($pfxPath, $pfxPassword) {
}

function ChechFileHash($path, $hash, $algorithm="SHA1") {
$h = Get-Filehash -Algorithm $algorithm $path
if ($h.Hash.ToUpper() -ne $hash.ToUpper()) {
throw "Hash comparison failed for file: $path"
$actualHash = (Get-Filehash -Algorithm $algorithm $path).Hash.ToUpper()
if ($actualHash -ne $hash.ToUpper()) {
throw "Hash comparison failed for file: $path. Expected hash: ${hash}. Actual hash: ${actualHash}"
}
}


function DownloadInstall-PythonMsi($platform, $python_template_dir, $pythonVersion, $PythonMsiChecksum, $algorithm="SHA1") {
$platformSuffix = ""
if ($platform -eq "x64") {
$platformSuffix = "-amd64"
}

if (Test-Path $python_template_dir) {
throw "$python_template_dir folder already exists"
}

$pythonInstallerPath = Join-Path (Resolve-Path "${python_template_dir}/..").Path "/python-${pythonVersion}${platformSuffix}.exe"
$pythonVersionEscaped = $pythonVersion.replace("_",".")
$PythonMsiUrl = "https://www.python.org/ftp/python/${pythonVersionEscaped}/python-${pythonVersionEscaped}${platformSuffix}.exe"

if ($python_template_dir -and (Test-Path $python_template_dir)) {
throw "Python template directory already exists"
}

$tmp_python_template_dir = "${python_template_dir}_tmp"
if ($tmp_python_template_dir -and (Test-Path $tmp_python_template_dir)) {
throw "Python temp template directory already exists"
}

try {
ExecRetry { DownloadFile $PythonMsiUrl $pythonInstallerPath }
ChechFileHash $pythonInstallerPath $PythonMsiChecksum $algorithm

Write-Host "Trying to uninstall Python using $pythonInstallerPath"
Start-Process -FilePath "${pythonInstallerPath}" -NoNewWindow -Wait `
-ArgumentList @("/quiet", "/uninstall")

$package = Get-Package -Name "Python ${pythonVersionEscaped}*" -ErrorAction SilentlyContinue
if ($package) {
throw "Python package was already installed"
}

Write-Host "Installing Python using $pythonInstallerPath"
Start-Process -FilePath "${pythonInstallerPath}" -NoNewWindow -Wait `
-ArgumentList @("/quiet", "TargetDir=${tmp_python_template_dir}","Include_test=0","Include_tcltk=0","Include_launcher=0","Include_doc=0")

Copy-Item -Recurse $tmp_python_template_dir $python_template_dir

} finally {

Start-Process -FilePath "${pythonInstallerPath}" -NoNewWindow -Wait `
-ArgumentList @("/quiet", "/uninstall")

if (Test-Path $pythonInstallerPath) {
Remove-Item $pythonInstallerPath
}

if (Test-Path $tmp_python_template_dir) {
Remove-Item $tmp_python_template_dir -Recurse -Force
}
}
if (!(Test-Path $python_template_dir)) {
throw "$python_template_dir has not been created"
}

}
Binary file removed Python313_13_x64_Template/DLLs/_asyncio.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_bz2.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_ctypes.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_decimal.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_elementtree.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_hashlib.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_lzma.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_multiprocessing.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_overlapped.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_queue.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_socket.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_sqlite3.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_ssl.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_uuid.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_wmi.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/_zoneinfo.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/pyexpat.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/python_lib.cat
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/select.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/sqlite3.dll
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/unicodedata.pyd
Binary file not shown.
Binary file removed Python313_13_x64_Template/DLLs/winsound.pyd
Binary file not shown.
Loading