From 101a4ab76e4b39d0759471f2e2d3f52dc4edd744 Mon Sep 17 00:00:00 2001 From: Adam Holmberg Date: Fri, 29 May 2015 12:59:02 -0500 Subject: [PATCH] Exclude the libevwrapper extention for Windows --- setup.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index df3aef27..e85d332d 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,7 @@ # limitations under the License. from __future__ import print_function +import os import sys import warnings @@ -37,9 +38,6 @@ from distutils.errors import (CCompilerError, DistutilsPlatformError, from distutils.cmd import Command -import os -import warnings - try: import subprocess has_subprocess = True @@ -247,6 +245,26 @@ elif "--no-libev" in sys.argv: sys.argv = [a for a in sys.argv if a != "--no-libev"] extensions.remove(libev_ext) +is_windows = os.name == 'nt' +if is_windows: + # libev is difficult to build, and uses select in Windows. + try: + extensions.remove(libev_ext) + except ValueError: + pass + build_extensions.error_message = """ +=============================================================================== +WARNING: could not compile %s. + +The C extensions are not required for the driver to run, but they add support +for token-aware routing with the Murmur3Partitioner. + +On Windows, make sure Visual Studio or an SDK is installed, and your environment +is configured to build for the appropriate architecture (matching your Python runtime). +This is often a matter of using vcvarsall.bat from your install directory, or running +from a command prompt in the Visual Studio Tools Start Menu. +=============================================================================== +""" platform_unsupported_msg = \ """