diff options
author | Bob Ippolito <bob@redivi.com> | 2017-11-24 09:13:46 -0800 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2017-11-24 09:15:02 -0800 |
commit | 518401fc950fb76848f9a170e3cfb35b5dfcfbff (patch) | |
tree | 1a370b94d2d7b31f2be463c8da253c85cadc77d4 | |
parent | 708026ea6ee10ffa15b9a28d5b06bb9b45a9da24 (diff) | |
download | simplejson-518401fc950fb76848f9a170e3cfb35b5dfcfbff.tar.gz |
fail build in CI if speedups do not build correctly
-rwxr-xr-x | .travis/run.sh | 3 | ||||
-rw-r--r-- | appveyor/run_with_env.cmd | 1 | ||||
-rw-r--r-- | setup.py | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/.travis/run.sh b/.travis/run.sh index 72b5c29..6fa6b73 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -9,8 +9,7 @@ if [[ $TRAVIS_OS_NAME == 'osx' ]]; then hash -r eval "$(pyenv init -)" fi - -python setup.py build_ext -i +REQUIRE_SPEEDUPS=1 python setup.py build_ext -i python -m compileall -f . python setup.py test diff --git a/appveyor/run_with_env.cmd b/appveyor/run_with_env.cmd index 5da547c..0a722f3 100644 --- a/appveyor/run_with_env.cmd +++ b/appveyor/run_with_env.cmd @@ -31,6 +31,7 @@ :: case, I don't know why. @ECHO OFF +SET REQUIRE_SPEEDUPS=Y SET COMMAND_TO_RUN=%* SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf @@ -1,6 +1,7 @@ #!/usr/bin/env python from __future__ import with_statement +import os import sys try: from setuptools import setup, Extension, Command @@ -112,6 +113,8 @@ def run_setup(with_binary): try: run_setup(not IS_PYPY) except BuildFailed: + if os.environ.get('REQUIRE_SPEEDUPS'): + raise BUILD_EXT_WARNING = ("WARNING: The C extension could not be compiled, " "speedups are not enabled.") print('*' * 75) |