Skip to content

Commit 540a254

Browse files
committed
Force Cython recompile when running tests
1 parent 99e4bde commit 540a254

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

appveyor.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ init:
99

1010
install:
1111
- choco install python.pypy > pypy-inst.log 2>&1 || (type pypy-inst.log & exit /b 1)
12-
- SET PATH=C:\tools\pypy\pypy;C:\Python35;C:\Python35\scripts;%PATH%
13-
- pip install tox
12+
- SET PATH=C:\Python35;C:\Python35\scripts;C:\tools\pypy\pypy;%PATH%
1413
- echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat"
1514
- pip install -r dev-requirements.txt
1615

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
pyx_path = os.path.join(base_path, 'bencoder.pyx')
1616
c_path = os.path.join(base_path, 'bencoder.c')
1717

18-
if sys.argv[-1] == 'test' and platform.python_implementation() == 'CPython':
18+
if 'test' in sys.argv and platform.python_implementation() == 'CPython':
19+
if os.path.exists(c_path):
20+
# Remove C file to force Cython recompile.
21+
os.remove(c_path)
1922
from Cython.Compiler.Options import directive_defaults
2023

2124
directive_defaults['linetrace'] = True

0 commit comments

Comments
 (0)