Skip to content

Commit

Permalink
fail build in CI if speedups do not build correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed Nov 24, 2017
1 parent 708026e commit 518401f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .travis/run.sh
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions appveyor/run_with_env.cmd
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions setup.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
from __future__ import with_statement

import os
import sys
try:
from setuptools import setup, Extension, Command
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 518401f

Please sign in to comment.