relenv 0.17.40000000__py3-none-any.whl → 0.18.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- relenv/__init__.py +1 -1
- relenv/__main__.py +1 -1
- relenv/_scripts/install_vc_build.ps1 +150 -0
- relenv/_toolchain/aarch64/aarch64-linux-gnu-ct-ng.config +798 -0
- relenv/_toolchain/aarch64/x86_64-linux-gnu-ct-ng.config +800 -0
- relenv/_toolchain/x86_64/aarch64-linux-gnu-ct-ng.config +799 -0
- relenv/_toolchain/x86_64/x86_64-linux-gnu-ct-ng.config +801 -0
- relenv/build/__init__.py +1 -1
- relenv/build/common.py +1 -1
- relenv/build/darwin.py +8 -8
- relenv/build/linux.py +24 -24
- relenv/build/windows.py +11 -9
- relenv/buildenv.py +1 -1
- relenv/check.py +1 -1
- relenv/common.py +11 -2
- relenv/create.py +1 -1
- relenv/fetch.py +12 -8
- relenv/relocate.py +1 -1
- relenv/runtime.py +4 -2
- relenv/toolchain.py +1 -1
- {relenv-0.17.40000000.dist-info → relenv-0.18.1.dist-info}/METADATA +2 -2
- relenv-0.18.1.dist-info/RECORD +38 -0
- {relenv-0.17.40000000.dist-info → relenv-0.18.1.dist-info}/WHEEL +1 -1
- tests/conftest.py +1 -1
- tests/test_build.py +1 -1
- tests/test_common.py +1 -1
- tests/test_create.py +1 -1
- tests/test_downloads.py +1 -1
- tests/test_fips_photon.py +1 -1
- tests/test_relocate.py +1 -1
- tests/test_runtime.py +1 -1
- tests/test_toolchain.py +1 -1
- tests/test_verify_build.py +36 -5
- relenv-0.17.40000000.dist-info/RECORD +0 -33
- {relenv-0.17.40000000.dist-info → relenv-0.18.1.dist-info}/LICENSE.md +0 -0
- {relenv-0.17.40000000.dist-info → relenv-0.18.1.dist-info}/NOTICE +0 -0
- {relenv-0.17.40000000.dist-info → relenv-0.18.1.dist-info}/entry_points.txt +0 -0
- {relenv-0.17.40000000.dist-info → relenv-0.18.1.dist-info}/top_level.txt +0 -0
relenv/__init__.py
CHANGED
relenv/__main__.py
CHANGED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Copyright 2022 VMware, Inc.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2
|
|
3
|
+
|
|
4
|
+
<#
|
|
5
|
+
Taken from: https://github.com/saltstack/salt-windows-nsis/blob/main/scripts/install_vs_buildtools.bat
|
|
6
|
+
|
|
7
|
+
.SYNOPSIS
|
|
8
|
+
Script that installs Visual Studio Build Tools
|
|
9
|
+
.DESCRIPTION
|
|
10
|
+
This script installs the Visual Studio Build Tools if they are not already
|
|
11
|
+
present on the system. Visual Studio Build Tools are the binaries and libraries
|
|
12
|
+
needed to build Python from source.
|
|
13
|
+
.EXAMPLE
|
|
14
|
+
install_vc_buildtools.ps1
|
|
15
|
+
#>
|
|
16
|
+
|
|
17
|
+
# Script Preferences
|
|
18
|
+
$ProgressPreference = "SilentlyContinue"
|
|
19
|
+
$ErrorActionPreference = "Stop"
|
|
20
|
+
|
|
21
|
+
#-------------------------------------------------------------------------------
|
|
22
|
+
# Start the Script
|
|
23
|
+
#-------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
Write-Host $("=" * 80)
|
|
26
|
+
Write-Host "Install Visual Studio Build Tools" -ForegroundColor Cyan
|
|
27
|
+
Write-Host $("-" * 80)
|
|
28
|
+
|
|
29
|
+
#-------------------------------------------------------------------------------
|
|
30
|
+
# Script Variables
|
|
31
|
+
#-------------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
# Dependency Variables
|
|
34
|
+
$VS_BLD_TOOLS = "https://aka.ms/vs/15/release/vs_buildtools.exe"
|
|
35
|
+
$VS_CL_BIN = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 14.0\VC\bin\cl.exe"
|
|
36
|
+
$MSBUILD_BIN = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe"
|
|
37
|
+
$WIN10_SDK_RC = "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.17763.0\x64\rc.exe"
|
|
38
|
+
|
|
39
|
+
#-------------------------------------------------------------------------------
|
|
40
|
+
# Visual Studio
|
|
41
|
+
#-------------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
$install_build_tools = $false
|
|
44
|
+
Write-Host "Confirming Presence of Visual Studio Build Tools: " -NoNewline
|
|
45
|
+
@($VS_CL_BIN, $MSBUILD_BIN, $WIN10_SDK_RC) | ForEach-Object {
|
|
46
|
+
if ( ! (Test-Path -Path $_) ) {
|
|
47
|
+
$install_build_tools = $true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if ( $install_build_tools ) {
|
|
52
|
+
Write-Host "Missing" -ForegroundColor Yellow
|
|
53
|
+
|
|
54
|
+
Write-Host "Checking available disk space: " -NoNewLine
|
|
55
|
+
$available = (Get-PSDrive $env:SystemDrive.Trim(":")).Free
|
|
56
|
+
if ( $available -gt (1024 * 1024 * 1024 * 9.1) ) {
|
|
57
|
+
Write-Host "Success" -ForegroundColor Green
|
|
58
|
+
} else {
|
|
59
|
+
Write-Host "Failed" -ForegroundColor Red
|
|
60
|
+
Write-Host "Not enough disk space"
|
|
61
|
+
exit 1
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
Write-Host "Downloading Visual Studio 2017 build tools: " -NoNewline
|
|
65
|
+
Invoke-WebRequest -Uri "$VS_BLD_TOOLS" -OutFile "$env:TEMP\vs_buildtools.exe"
|
|
66
|
+
if ( Test-Path -Path "$env:TEMP\vs_buildtools.exe" ) {
|
|
67
|
+
Write-Host "Success" -ForegroundColor Green
|
|
68
|
+
} else {
|
|
69
|
+
Write-Host "Failed" -ForegroundColor Red
|
|
70
|
+
exit 1
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
Write-Host "Creating Layout for Visual Studio 2017 build tools: " -NoNewline
|
|
74
|
+
if ( ! (Test-Path -Path "$($env:TEMP)\build_tools") ) {
|
|
75
|
+
New-Item -Path "$($env:TEMP)\build_tools" -ItemType Directory | Out-Null
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
Start-Process -FilePath "$env:TEMP\vs_buildtools.exe" `
|
|
79
|
+
-ArgumentList "--layout `"$env:TEMP\build_tools`"", `
|
|
80
|
+
"--add Microsoft.VisualStudio.Workload.MSBuildTools", `
|
|
81
|
+
"--add Microsoft.VisualStudio.Workload.VCTools", `
|
|
82
|
+
"--add Microsoft.VisualStudio.Component.Windows81SDK", `
|
|
83
|
+
"--add Microsoft.VisualStudio.Component.Windows10SDK.17763", `
|
|
84
|
+
"--add Microsoft.VisualStudio.Component.VC.140", `
|
|
85
|
+
"--add Microsoft.Component.VC.Runtime.UCRTSDK", `
|
|
86
|
+
"--lang en-US", `
|
|
87
|
+
"--includeRecommended", `
|
|
88
|
+
"--quiet", `
|
|
89
|
+
"--wait" `
|
|
90
|
+
-Wait -WindowStyle Hidden
|
|
91
|
+
if ( Test-Path -Path "$env:TEMP\build_tools\vs_buildtools.exe" ) {
|
|
92
|
+
Write-Host "Success" -ForegroundColor Green
|
|
93
|
+
} else {
|
|
94
|
+
Write-Host "Failed" -ForegroundColor Red
|
|
95
|
+
exit 1
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
# Serial: 28cc3a25bfba44ac449a9b586b4339a
|
|
99
|
+
# Hash: 3b1efd3a66ea28b16697394703a72ca340a05bd5
|
|
100
|
+
if (! (Test-Path -Path Cert:\LocalMachine\Root\3b1efd3a66ea28b16697394703a72ca340a05bd5) ) {
|
|
101
|
+
Write-Host "Installing Certificate Sign Root Certificate: " -NoNewLine
|
|
102
|
+
Start-Process -FilePath "certutil" `
|
|
103
|
+
-ArgumentList "-addstore", `
|
|
104
|
+
"Root", `
|
|
105
|
+
"$($env:TEMP)\build_tools\certificates\manifestCounterSignRootCertificate.cer" `
|
|
106
|
+
-Wait -WindowStyle Hidden
|
|
107
|
+
if ( Test-Path -Path Cert:\LocalMachine\Root\3b1efd3a66ea28b16697394703a72ca340a05bd5 ) {
|
|
108
|
+
Write-Host "Success" -ForegroundColor Green
|
|
109
|
+
} else {
|
|
110
|
+
Write-Host "Failed" -ForegroundColor Yellow
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
# Serial: 3f8bc8b5fc9fb29643b569d66c42e144
|
|
115
|
+
# Hash: 8f43288ad272f3103b6fb1428485ea3014c0bcfe
|
|
116
|
+
if (! (Test-Path -Path Cert:\LocalMachine\Root\8f43288ad272f3103b6fb1428485ea3014c0bcfe) ) {
|
|
117
|
+
Write-Host "Installing Certificate Root Certificate: " -NoNewLine
|
|
118
|
+
Start-Process -FilePath "certutil" `
|
|
119
|
+
-ArgumentList "-addstore", `
|
|
120
|
+
"Root", `
|
|
121
|
+
"$($env:TEMP)\build_tools\certificates\manifestRootCertificate.cer" `
|
|
122
|
+
-Wait -WindowStyle Hidden
|
|
123
|
+
if ( Test-Path -Path Cert:\LocalMachine\Root\8f43288ad272f3103b6fb1428485ea3014c0bcfe ) {
|
|
124
|
+
Write-Host "Success" -ForegroundColor Green
|
|
125
|
+
} else {
|
|
126
|
+
Write-Host "Failed" -ForegroundColor Yellow
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
Write-Host "Installing Visual Studio 2017 build tools: " -NoNewline
|
|
131
|
+
Start-Process -FilePath "$env:TEMP\build_tools\vs_setup.exe" `
|
|
132
|
+
-ArgumentList "--wait", "--noweb", "--quiet" `
|
|
133
|
+
-Wait
|
|
134
|
+
@($VS_CL_BIN, $MSBUILD_BIN, $WIN10_SDK_RC) | ForEach-Object {
|
|
135
|
+
if ( ! (Test-Path -Path $_) ) {
|
|
136
|
+
Write-Host "Failed" -ForegroundColor Red
|
|
137
|
+
exit 1
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
Write-Host "Success" -ForegroundColor Green
|
|
141
|
+
} else {
|
|
142
|
+
Write-Host "Success" -ForegroundColor Green
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
#-------------------------------------------------------------------------------
|
|
146
|
+
# Finished
|
|
147
|
+
#-------------------------------------------------------------------------------
|
|
148
|
+
Write-Host $("-" * 80)
|
|
149
|
+
Write-Host "Install Visual Studio Build Tools Completed" -ForegroundColor Cyan
|
|
150
|
+
Write-Host $("=" * 80)
|