language: python
install:
  - pip install -r requirements.txt --use-mirrors
  - cython termformat.pyx
  - python setup.py build_ext --inplace
script:
  - nosetests
language: python
install:
  - pip install -r requirements.txt --use-mirrors
before_script:
  - cython termformat.pyx
  - python setup.py build_ext --inplace
script:
  - nosetests

Move extension build to before_script step
Move extension build to before_script step