mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2019.2' into merge-2018.3
This commit is contained in:
commit
09fb3e7fc5
8 changed files with 77 additions and 49 deletions
|
@ -22,22 +22,10 @@
|
|||
|
||||
# Load parameters
|
||||
param(
|
||||
[switch]$Silent
|
||||
[switch]$Silent,
|
||||
[switch]$NoPipDependencies
|
||||
)
|
||||
|
||||
Write-Output "================================================================="
|
||||
Write-Output ""
|
||||
Write-Output " Development Environment Installation"
|
||||
Write-Output ""
|
||||
Write-Output " - Installs All Salt Dependencies"
|
||||
Write-Output " - Detects 32/64 bit Architectures"
|
||||
Write-Output ""
|
||||
Write-Output " To run silently add -Silent"
|
||||
Write-Output " eg: dev_env.ps1 -Silent"
|
||||
Write-Output ""
|
||||
Write-Output "================================================================="
|
||||
Write-Output ""
|
||||
|
||||
#==============================================================================
|
||||
# Get the Directory of actual script
|
||||
#==============================================================================
|
||||
|
@ -49,6 +37,22 @@ $script_path = $script_path.DirectoryName
|
|||
#==============================================================================
|
||||
$script_name = $MyInvocation.MyCommand.Name
|
||||
|
||||
Write-Output "================================================================="
|
||||
Write-Output ""
|
||||
Write-Output " Development Environment Installation"
|
||||
Write-Output ""
|
||||
Write-Output " - Installs All Salt Dependencies"
|
||||
Write-Output " - Detects 32/64 bit Architectures"
|
||||
Write-Output ""
|
||||
Write-Output " To run silently add -Silent"
|
||||
Write-Output " eg: ${script_name} -Silent"
|
||||
Write-Output ""
|
||||
Write-Output " To run skip installing pip dependencies add -NoPipDependencies"
|
||||
Write-Output " eg: ${script_name} -NoPipDependencies"
|
||||
Write-Output ""
|
||||
Write-Output "================================================================="
|
||||
Write-Output ""
|
||||
|
||||
#==============================================================================
|
||||
# Import Modules
|
||||
#==============================================================================
|
||||
|
@ -199,12 +203,23 @@ Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python2Dir'])\pyth
|
|||
|
||||
|
||||
#==============================================================================
|
||||
# Install pypi resources using pip
|
||||
# Install windows specific pypi resources using pip
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Installing pypi resources using pip . . ."
|
||||
Write-Output " - $script_name :: Installing windows specific pypi resources using pip . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python2Dir'])\python.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_path)\req.txt" "pip install"
|
||||
Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python2Dir'])\python.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_path)\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']['Python2Dir'])\python.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_path)\req.txt" "pip install"
|
||||
}
|
||||
|
||||
|
||||
#==============================================================================
|
||||
|
|
|
@ -22,22 +22,10 @@
|
|||
|
||||
# Load parameters
|
||||
param(
|
||||
[switch]$Silent
|
||||
[switch]$Silent,
|
||||
[switch]$NoPipDependencies
|
||||
)
|
||||
|
||||
Write-Output "================================================================="
|
||||
Write-Output ""
|
||||
Write-Output " Development Environment Installation"
|
||||
Write-Output ""
|
||||
Write-Output " - Installs All Salt Dependencies"
|
||||
Write-Output " - Detects 32/64 bit Architectures"
|
||||
Write-Output ""
|
||||
Write-Output " To run silently add -Silent"
|
||||
Write-Output " eg: dev_env.ps1 -Silent"
|
||||
Write-Output ""
|
||||
Write-Output "================================================================="
|
||||
Write-Output ""
|
||||
|
||||
#==============================================================================
|
||||
# Get the Directory of actual script
|
||||
#==============================================================================
|
||||
|
@ -49,6 +37,22 @@ $script_path = $script_path.DirectoryName
|
|||
#==============================================================================
|
||||
$script_name = $MyInvocation.MyCommand.Name
|
||||
|
||||
Write-Output "================================================================="
|
||||
Write-Output ""
|
||||
Write-Output " Development Environment Installation"
|
||||
Write-Output ""
|
||||
Write-Output " - Installs All Salt Dependencies"
|
||||
Write-Output " - Detects 32/64 bit Architectures"
|
||||
Write-Output ""
|
||||
Write-Output " To run silently add -Silent"
|
||||
Write-Output " eg: ${script_name} -Silent"
|
||||
Write-Output ""
|
||||
Write-Output " To run skip installing pip dependencies add -NoPipDependencies"
|
||||
Write-Output " eg: ${script_name} -NoPipDependencies"
|
||||
Write-Output ""
|
||||
Write-Output "================================================================="
|
||||
Write-Output ""
|
||||
|
||||
#==============================================================================
|
||||
# Import Modules
|
||||
#==============================================================================
|
||||
|
@ -197,13 +201,24 @@ Write-Output " - $script_name :: Updating PIP and SetupTools . . ."
|
|||
Write-Output " ----------------------------------------------------------------"
|
||||
Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python3Dir'])\python.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_path)\req_pip.txt" "python pip"
|
||||
|
||||
|
||||
#==============================================================================
|
||||
# Install windows specific pypi resources using pip
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Installing windows specific pypi resources using pip . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python3Dir'])\python.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_path)\req_win.txt" "pip install"
|
||||
|
||||
#==============================================================================
|
||||
# Install pypi resources using pip
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Installing pypi resources using pip . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Start_Process_and_test_exitcode "cmd" "/c $($ini['Settings']['Python3Dir'])\python.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_path)\req.txt" "pip install"
|
||||
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'])\python.exe -m pip --disable-pip-version-check --no-cache-dir install -r $($script_path)\req.txt" "pip install"
|
||||
}
|
||||
|
||||
#==============================================================================
|
||||
# Cleaning Up PyWin32
|
||||
|
@ -237,11 +252,13 @@ Remove-Item "$($ini['Settings']['Scripts3Dir'])\pywin32_*" -Force -Recurse
|
|||
#==============================================================================
|
||||
# Fix PyCrypto
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Fixing PyCrypto . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
$nt_file = "$($ini['Settings']['Python3Dir'])\Lib\site-packages\Crypto\Random\OSRNG\nt.py"
|
||||
(Get-Content $nt_file) | Foreach-Object {$_ -replace '^import winrandom$', 'from Crypto.Random.OSRNG import winrandom'} | Set-Content $nt_file
|
||||
If ($NoPipDependencies -eq $false) {
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Fixing PyCrypto . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
$nt_file = "$($ini['Settings']['Python3Dir'])\Lib\site-packages\Crypto\Random\OSRNG\nt.py"
|
||||
(Get-Content $nt_file) | Foreach-Object {$_ -replace '^import winrandom$', 'from Crypto.Random.OSRNG import winrandom'} | Set-Content $nt_file
|
||||
}
|
||||
|
||||
#==============================================================================
|
||||
# Copy DLLs to Python Directory
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
-r req_win.txt
|
||||
backports-abc==0.5
|
||||
backports.ssl-match-hostname==3.7.0.1
|
||||
certifi
|
||||
|
@ -28,7 +29,6 @@ pyOpenSSL==18.0.0
|
|||
python-dateutil==2.7.5
|
||||
python-gnupg==0.4.3
|
||||
pythonnet==2.3.0
|
||||
pywin32==224
|
||||
PyYAML==3.13
|
||||
pyzmq==17.1.2
|
||||
requests==2.21.0
|
||||
|
@ -37,4 +37,3 @@ smmap==0.9.0
|
|||
timelib==0.2.4
|
||||
tornado==4.5.3
|
||||
wheel==0.32.3
|
||||
WMI==1.4.9
|
||||
|
|
2
pkg/windows/req_win.txt
Normal file
2
pkg/windows/req_win.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
pywin32==224
|
||||
WMI==1.4.9
|
|
@ -28,7 +28,6 @@ import salt.config as config
|
|||
import salt.client
|
||||
import salt.ext.six as six
|
||||
from salt._compat import ipaddress
|
||||
|
||||
from salt.exceptions import SaltCloudException, SaltCloudSystemExit
|
||||
|
||||
# Get logging started
|
||||
|
|
|
@ -28,7 +28,6 @@ from salt.ext import six
|
|||
from salt.ext.six.moves import range # pylint: disable=import-error,no-name-in-module,redefined-builtin
|
||||
from salt._compat import ipaddress
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -32,10 +32,7 @@ try:
|
|||
import wmi # pylint: disable=W0611
|
||||
except ImportError:
|
||||
HAS_DEPENDENCIES = False
|
||||
if six.PY3:
|
||||
import ipaddress
|
||||
else:
|
||||
import salt.ext.ipaddress as ipaddress
|
||||
from salt._compat import ipaddress
|
||||
|
||||
# Define the module's virtual name
|
||||
__virtualname__ = 'network'
|
||||
|
|
|
@ -53,7 +53,7 @@ import logging
|
|||
|
||||
# Import Salt libs
|
||||
import salt.utils.http
|
||||
import salt.ext.ipaddress as ipaddress
|
||||
from salt._compat import ipaddress
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue