mirror of
https://github.com/saltstack/salt.git
synced 2025-04-15 09:10:20 +00:00
Properly handle PyZMQ >= 0.14 when freezing
This commit is contained in:
parent
c5f294f1df
commit
13cfa54065
1 changed files with 13 additions and 0 deletions
13
setup.py
13
setup.py
|
@ -22,6 +22,12 @@ from distutils.command.clean import clean
|
|||
from distutils.command.sdist import sdist
|
||||
# pylint: enable=E0611
|
||||
|
||||
try:
|
||||
import zmq
|
||||
HAS_ZMQ = True
|
||||
except ImportError:
|
||||
HAS_ZMQ = False
|
||||
|
||||
# Change to salt source's directory prior to running any command
|
||||
try:
|
||||
SETUP_DIRNAME = os.path.dirname(__file__)
|
||||
|
@ -517,6 +523,13 @@ FREEZER_INCLUDES = [
|
|||
'email.mime.*',
|
||||
]
|
||||
|
||||
if HAS_ZMQ and zmq.pyzmq_version_info() >= (0, 14):
|
||||
# We're freezing, and when freezing ZMQ needs to be installed, so this
|
||||
# works fine
|
||||
if 'zmq.core.*' in FREEZER_INCLUDES:
|
||||
# For PyZMQ >= 0.14, freezing does not need 'zmq.core.*'
|
||||
FREEZER_INCLUDES.remove('zmq.core.*')
|
||||
|
||||
if IS_WINDOWS_PLATFORM:
|
||||
FREEZER_INCLUDES.extend([
|
||||
'win32api',
|
||||
|
|
Loading…
Add table
Reference in a new issue