Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit 101a4ab

Browse files
committed
Exclude the libevwrapper extention for Windows
1 parent 8e565d0 commit 101a4ab

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

setup.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
from __future__ import print_function
16+
import os
1617
import sys
1718
import warnings
1819

@@ -37,9 +38,6 @@
3738
from distutils.cmd import Command
3839

3940

40-
import os
41-
import warnings
42-
4341
try:
4442
import subprocess
4543
has_subprocess = True
@@ -247,6 +245,26 @@ def run_setup(extensions):
247245
sys.argv = [a for a in sys.argv if a != "--no-libev"]
248246
extensions.remove(libev_ext)
249247

248+
is_windows = os.name == 'nt'
249+
if is_windows:
250+
# libev is difficult to build, and uses select in Windows.
251+
try:
252+
extensions.remove(libev_ext)
253+
except ValueError:
254+
pass
255+
build_extensions.error_message = """
256+
===============================================================================
257+
WARNING: could not compile %s.
258+
259+
The C extensions are not required for the driver to run, but they add support
260+
for token-aware routing with the Murmur3Partitioner.
261+
262+
On Windows, make sure Visual Studio or an SDK is installed, and your environment
263+
is configured to build for the appropriate architecture (matching your Python runtime).
264+
This is often a matter of using vcvarsall.bat from your install directory, or running
265+
from a command prompt in the Visual Studio Tools Start Menu.
266+
===============================================================================
267+
"""
250268

251269
platform_unsupported_msg = \
252270
"""

0 commit comments

Comments
 (0)