Commits

Brandon Rhodes committed 449d357

Added two short comments to help readers know how the library is loaded.

Comments (0)

Files changed (2)

 
 # Patch pyzmq to load an extra library.
 
-sed -i '/import initthreads/s/^/import ctypes\
+sed -i '/import initthreads/s/^/# First, use ctypes to load the shared library.\
+\
+import ctypes\
 import os\
 p = os.path.join(os.path.dirname(__file__), "_zeromq.so")\
 _zeromq = ctypes.CDLL(p, mode=ctypes.RTLD_GLOBAL)\
 del ctypes, os, p\
 \
+# Now we can safely proceed to load the Python extensions.\
+\
 /' zmq/__init__.py
 
 # Generate platform.hpp from platform.hpp.in so that I can compare it
 # Imports
 #-----------------------------------------------------------------------------
 
+# First, use ctypes to load the shared library.
+
 import ctypes
 import os
 p = os.path.join(os.path.dirname(__file__), "_zeromq.so")
 _zeromq = ctypes.CDLL(p, mode=ctypes.RTLD_GLOBAL)
 del ctypes, os, p
 
+# Now we can safely proceed to load the Python extensions.
+
 from zmq.utils import initthreads # initialize threads
 initthreads.init_threads()