Skip to content

Commit

Permalink
Force cython when building sdist
Browse files Browse the repository at this point in the history
Fixes #182
  • Loading branch information
perlpunk committed Jun 30, 2018
1 parent d3eb7da commit d76d037
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Expand Up @@ -77,12 +77,16 @@
sys.modules['distutils.command.build_ext'].Extension = _Extension

with_cython = False
if 'sdist' in sys.argv:
# we need cython here
with_cython = True
try:
from Cython.Distutils.extension import Extension as _Extension
from Cython.Distutils import build_ext as _build_ext
with_cython = True
except ImportError:
pass
if with_cython:
raise

try:
from wheel.bdist_wheel import bdist_wheel
Expand Down

0 comments on commit d76d037

Please sign in to comment.