"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/windows/build_env_3.ps1" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

build_env_3.ps1  (salt-2019.2.0):build_env_3.ps1  (salt-2019.2.1)
skipping to change at line 25 skipping to change at line 25
# COPYRIGHT: (c) 2012-2017 by the SaltStack Team, see AUTHORS.rst for more # COPYRIGHT: (c) 2012-2017 by the SaltStack Team, see AUTHORS.rst for more
# details. # details.
# #
# LICENSE: Apache 2.0 # LICENSE: Apache 2.0
# ORGANIZATION: SaltStack (saltstack.org) # ORGANIZATION: SaltStack (saltstack.org)
# CREATED: 03/10/2017 # CREATED: 03/10/2017
#============================================================================== #==============================================================================
# Load parameters # Load parameters
param( param(
[switch]$Silent [switch]$Silent,
[switch]$NoPipDependencies
) )
#==============================================================================
# Get the Directory of actual script
#==============================================================================
$script_path = dir "$($myInvocation.MyCommand.Definition)"
$script_path = $script_path.DirectoryName
#==============================================================================
# Get the name of actual script
#==============================================================================
$script_name = $MyInvocation.MyCommand.Name
Write-Output "=================================================================" Write-Output "================================================================="
Write-Output "" Write-Output ""
Write-Output " Development Environment Installation" Write-Output " Development Environment Installation"
Write-Output "" Write-Output ""
Write-Output " - Installs All Salt Dependencies" Write-Output " - Installs All Salt Dependencies"
Write-Output " - Detects 32/64 bit Architectures" Write-Output " - Detects 32/64 bit Architectures"
Write-Output "" Write-Output ""
Write-Output " To run silently add -Silent" Write-Output " To run silently add -Silent"
Write-Output " eg: dev_env.ps1 -Silent" Write-Output " eg: ${script_name} -Silent"
Write-Output ""
Write-Output " To run skip installing pip dependencies add -NoPipD
ependencies"
Write-Output " eg: ${script_name} -NoPipDependencies"
Write-Output "" Write-Output ""
Write-Output "=================================================================" Write-Output "================================================================="
Write-Output "" Write-Output ""
#============================================================================== #==============================================================================
# Get the Directory of actual script
#==============================================================================
$script_path = dir "$($myInvocation.MyCommand.Definition)"
$script_path = $script_path.DirectoryName
#==============================================================================
# Get the name of actual script
#==============================================================================
$script_name = $MyInvocation.MyCommand.Name
#==============================================================================
# Import Modules # Import Modules
#============================================================================== #==============================================================================
Import-Module $script_path\Modules\download-module.psm1 Import-Module $script_path\Modules\download-module.psm1
Import-Module $script_path\Modules\get-settings.psm1 Import-Module $script_path\Modules\get-settings.psm1
Import-Module $script_path\Modules\uac-module.psm1 Import-Module $script_path\Modules\uac-module.psm1
Import-Module $script_path\Modules\zip-module.psm1 Import-Module $script_path\Modules\zip-module.psm1
Import-Module $script_path\Modules\start-process-and-test-exitcode.psm1 Import-Module $script_path\Modules\start-process-and-test-exitcode.psm1
#============================================================================== #==============================================================================
# Check for Elevated Privileges # Check for Elevated Privileges
#============================================================================== #==============================================================================
skipping to change at line 201 skipping to change at line 205
#============================================================================== #==============================================================================
# Update PIP and SetupTools # Update PIP and SetupTools
#============================================================================== #==============================================================================
Write-Output " ----------------------------------------------------------------" Write-Output " ----------------------------------------------------------------"
Write-Output " - $script_name :: Updating PIP and SetupTools . . ." Write-Output " - $script_name :: Updating PIP and SetupTools . . ."
Write-Output " ----------------------------------------------------------------" Write-Output " ----------------------------------------------------------------"
Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python3Dir'])\pyth on.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_pa th)\req_pip.txt" "python pip" Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python3Dir'])\pyth on.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_pa th)\req_pip.txt" "python pip"
#============================================================================== #==============================================================================
# Install pypi resources using pip # Install windows specific pypi resources using pip
#============================================================================== #==============================================================================
Write-Output " ----------------------------------------------------------------" Write-Output " ----------------------------------------------------------------"
Write-Output " - $script_name :: Installing pypi resources using pip . . ." Write-Output " - $script_name :: Installing windows specific pypi resources usin g pip . . ."
Write-Output " ----------------------------------------------------------------" Write-Output " ----------------------------------------------------------------"
Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python3Dir'])\pyth Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python3Dir'])\pyth
on.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_pa on.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_pa
th)\req.txt" "pip install" th)\req_win.txt" "pip install"
#==============================================================================
# Install pypi resources using pip
#==============================================================================
If ($NoPipDependencies -eq $false) {
Write-Output " ---------------------------------------------------------------
-"
Write-Output " - $script_name :: Installing pypi resources using pip . . ."
Write-Output " ---------------------------------------------------------------
-"
Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python3Dir'])\py
thon.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_
path)\req.txt" "pip install"
}
#============================================================================== #==============================================================================
# Cleaning Up PyWin32 # Cleaning Up PyWin32
#============================================================================== #==============================================================================
Write-Output " ----------------------------------------------------------------" Write-Output " ----------------------------------------------------------------"
Write-Output " - $script_name :: Cleaning Up PyWin32 . . ." Write-Output " - $script_name :: Cleaning Up PyWin32 . . ."
Write-Output " ----------------------------------------------------------------" Write-Output " ----------------------------------------------------------------"
# Move DLL's to Python Root # Move DLL's to Python Root
# The dlls have to be in Python directory and the site-packages\win32 directory # The dlls have to be in Python directory and the site-packages\win32 directory
skipping to change at line 229 skipping to change at line 243
Move-Item "$($ini['Settings']['SitePkgs3Dir'])\pywin32_system32\*.dll" "$($ini[' Settings']['SitePkgs3Dir'])\win32" -Force Move-Item "$($ini['Settings']['SitePkgs3Dir'])\pywin32_system32\*.dll" "$($ini[' Settings']['SitePkgs3Dir'])\win32" -Force
# Create gen_py directory # Create gen_py directory
Write-Output " - $script_name :: Creating gen_py Directory . . ." Write-Output " - $script_name :: Creating gen_py Directory . . ."
New-Item -Path "$($ini['Settings']['SitePkgs3Dir'])\win32com\gen_py" -ItemType D irectory -Force | Out-Null New-Item -Path "$($ini['Settings']['SitePkgs3Dir'])\win32com\gen_py" -ItemType D irectory -Force | Out-Null
# Remove pywin32_system32 directory # Remove pywin32_system32 directory
Write-Output " - $script_name :: Removing pywin32_system32 Directory . . ." Write-Output " - $script_name :: Removing pywin32_system32 Directory . . ."
Remove-Item "$($ini['Settings']['SitePkgs3Dir'])\pywin32_system32" Remove-Item "$($ini['Settings']['SitePkgs3Dir'])\pywin32_system32"
# Remove pythonwin directory
Write-Output " - $script_name :: Removing pythonwin Directory . . ."
Remove-Item "$($ini['Settings']['SitePkgs3Dir'])\pythonwin" -Force -Recurse
# Remove PyWin32 PostInstall and testall Scripts # Remove PyWin32 PostInstall and testall Scripts
Write-Output " - $script_name :: Removing PyWin32 scripts . . ." Write-Output " - $script_name :: Removing PyWin32 scripts . . ."
Remove-Item "$($ini['Settings']['Scripts3Dir'])\pywin32_*" -Force -Recurse Remove-Item "$($ini['Settings']['Scripts3Dir'])\pywin32_*" -Force -Recurse
#============================================================================== #==============================================================================
# Fix PyCrypto # Fix PyCrypto
#============================================================================== #==============================================================================
Write-Output " ----------------------------------------------------------------" If ($NoPipDependencies -eq $false) {
Write-Output " - $script_name :: Fixing PyCrypto . . ." Write-Output " ---------------------------------------------------------------
Write-Output " ----------------------------------------------------------------" -"
$nt_file = "$($ini['Settings']['Python3Dir'])\Lib\site-packages\Crypto\Random\OS Write-Output " - $script_name :: Fixing PyCrypto . . ."
RNG\nt.py" Write-Output " ---------------------------------------------------------------
(Get-Content $nt_file) | Foreach-Object {$_ -replace '^import winrandom$', 'from -"
Crypto.Random.OSRNG import winrandom'} | Set-Content $nt_file $nt_file = "$($ini['Settings']['Python3Dir'])\Lib\site-packages\Crypto\Random\
OSRNG\nt.py"
(Get-Content $nt_file) | Foreach-Object {$_ -replace '^import winrandom$', 'fr
om Crypto.Random.OSRNG import winrandom'} | Set-Content $nt_file
}
#============================================================================== #==============================================================================
# Copy DLLs to Python Directory # Copy DLLs to Python Directory
#============================================================================== #==============================================================================
Write-Output " ----------------------------------------------------------------" Write-Output " ----------------------------------------------------------------"
Write-Output " - $script_name :: Copying DLLs . . ." Write-Output " - $script_name :: Copying DLLs . . ."
Write-Output " ----------------------------------------------------------------" Write-Output " ----------------------------------------------------------------"
# Architecture Specific DLL's # Architecture Specific DLL's
ForEach($key in $ini[$bitDLLs].Keys) { ForEach($key in $ini[$bitDLLs].Keys) {
Write-Output " - $key . . ." Write-Output " - $key . . ."
 End of changes. 9 change blocks. 
29 lines changed or deleted 48 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)