diff --git a/setup.py b/setup.py index e5ad7b9..007981e 100755 --- a/setup.py +++ b/setup.py @@ -29,6 +29,7 @@ import time import errno import platform from traceback import print_exc +from sysconfig import _POSIX_BUILD try: import cffi @@ -170,7 +171,7 @@ def bundled_settings(debug): # is this necessary? if sys.platform.startswith('freebsd'): settings['libraries'].append('pthread') - elif sys.platform.startswith('win'): + elif sys.platform.startswith('win') and not _POSIX_BUILD: # link against libzmq in build dir: plat = distutils.util.get_platform() temp = 'temp.%s-%i.%i' % (plat, sys.version_info[0], sys.version_info[1]) @@ -534,7 +535,7 @@ class Configure(build_ext): ) line() - if sys.platform.startswith('win'): + if sys.platform.startswith('win') and not _POSIX_BUILD: # fetch libzmq.dll into local dir local_dll = localpath('zmq', libzmq_name + '.dll') if not zmq_prefix and not os.path.exists(local_dll): @@ -626,7 +627,7 @@ class Configure(build_ext): libzmq.define_macros.append(('ZMQ_IOTHREADS_USE_POLL', 1)) libzmq.define_macros.append(('ZMQ_POLL_BASED_ON_POLL', 1)) - if sys.platform.startswith('win'): + if sys.platform.startswith('win') and not _POSIX_BUILD: # include defines from zeromq msvc project: libzmq.define_macros.append(('FD_SETSIZE', 16384)) libzmq.define_macros.append(('DLL_EXPORT', 1))