Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force cython when building sdist (see 196 instead) #188

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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:
log.warn("WARNING: failed to import cython, may not be able compile extensions")

try:
from wheel.bdist_wheel import bdist_wheel
Expand Down