Skip to content

Commit

Permalink
Merge pull request #946 from mandiant/python3-library-update
Browse files Browse the repository at this point in the history
Update Python3 Libraries Package with New Function
  • Loading branch information
Ana06 authored Apr 10, 2024
2 parents 5dcdd11 + 60a500c commit a94caaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/libraries.python3.vm/libraries.python3.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>libraries.python3.vm</id>
<version>0.0.0.20240325</version>
<version>0.0.0.20240410</version>
<description>Metapackage to install common Python libraries</description>
<authors>Several, check in pypi.org for every of the libraries</authors>
<dependencies>
<dependency id="common.vm" />
<dependency id="common.vm" version="[0.0.0.20240409]"/>
<dependency id="vcbuildtools.vm" />
<dependency id="python3.vm" />
</dependencies>
Expand Down
8 changes: 2 additions & 6 deletions packages/libraries.python3.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ try {
$modulesPath = Join-Path $toolDir "modules.xml" -Resolve
$modulesXml = [xml](Get-Content $modulesPath)

# Create output file to log python module installation details
$outputFile = VM-New-Install-Log $toolDir

# Fix pip version
Invoke-Expression "py -3.10 -m pip install pip~=23.2.1 >> $outputFile"
VM-Pip-Install "pip~=23.2.1"

$failures = @()
$modules = $modulesXml.modules.module
Expand All @@ -21,7 +18,7 @@ try {
$installValue = $module.url
}

Invoke-Expression "py -3.10 -m pip install $installValue 2>&1 >> $outputFile"
VM-Pip-Install $installValue

if ($LastExitCode -eq 0) {
Write-Host "`t[+] Installed Python 3.10 module: $($module.name)" -ForegroundColor Green
Expand All @@ -44,4 +41,3 @@ try {
} catch {
VM-Write-Log-Exception $_
}

0 comments on commit a94caaa

Please sign in to comment.