Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 29fac0d

Browse files
robertwbsilviulica
authored andcommitted
Don't even try to run Cython on Windows
MSVC doesn't always provide stdint.h ----Release Notes---- [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=120928800
1 parent 0edd4bf commit 29fac0d

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

setup.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,22 @@
1515
"""Python Dataflow SDK and Worker setup configuration."""
1616

1717
import os
18+
import platform
1819
import re
1920
import setuptools
2021

22+
2123
# Currently all compiled modules are optional (for performance only).
2224
# Cython is available on the workers, but we don't require it for development.
23-
try:
24-
# pylint: disable=g-statement-before-imports,g-import-not-at-top
25-
from Cython.Build import cythonize
26-
except ImportError:
25+
if platform.system() == 'Windows':
26+
# Windows doesn't always provide int64_t.
2727
cythonize = lambda *args, **kwargs: []
28+
else:
29+
try:
30+
# pylint: disable=g-statement-before-imports,g-import-not-at-top
31+
from Cython.Build import cythonize
32+
except ImportError:
33+
cythonize = lambda *args, **kwargs: []
2834

2935

3036
# Configure the required packages and scripts to install.

0 commit comments

Comments
 (0)