-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
hook-zmq.backend.py
29 lines (24 loc) · 1.22 KB
/
hook-zmq.backend.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2015, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
"""
Hook for PyZMQ. Cython based Python bindings for messaging library ZeroMQ.
http://www.zeromq.org/
"""
from PyInstaller.utils.hooks import collect_dynamic_libs, collect_submodules
hiddenimports = ['zmq.utils.garbage']
hiddenimports.extend(collect_submodules('zmq.backend'))
# If PyZMQ provides its own copy of libzmq and libsodium, add it to the
# extension-modules TOC so zmq/__init__.py can load it at runtime.
# PyZMQ is able to load 'libzmq' and 'libsodium' even from sys._MEIPASS.
# So they could be with other .dlls.
binaries = collect_dynamic_libs('zmq', destdir='.')
# If PyZMQ pvorides its own copy of libzmq and libsodium, these libs look like
# C extensions. Excluding these modules ensures that those dlls are not bundled
# twice. Once as ./zmq.libzmq.pyd and once as ./zmq/libzmq.py.
excludedimports = ['zmq.libzmq']