summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTina Müller <cpan2@tinita.de>2018-06-28 21:23:52 +0200
committerTina Müller <cpan2@tinita.de>2018-06-30 22:49:22 +0200
commitd76d03711913008b0c1239e910ae91ed457d0024 (patch)
tree0ba5dc8477d706f39fe324c75c76e1890629a2fd
parentd3eb7daf88e29bc20ffd4cfb833da3c49c617625 (diff)
downloadpyyaml-git-d76d03711913008b0c1239e910ae91ed457d0024.tar.gz
Force cython when building sdist
Fixes #182
-rw-r--r--setup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index a1a87a2..cc102d9 100644
--- a/setup.py
+++ b/setup.py
@@ -77,12 +77,16 @@ if 'setuptools.extension' in sys.modules:
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