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 5c3984b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Expand Up @@ -77,12 +77,18 @@
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
else:
pass

try:
from wheel.bdist_wheel import bdist_wheel
Expand Down

0 comments on commit 5c3984b

Please sign in to comment.