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 #196

Merged
merged 2 commits into from Jun 30, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -21,6 +21,6 @@ matrix:
- python: pypy
env: TOXENV=pypy

install: pip install tox
install: pip install cython tox

script: tox
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