Skip to content

Commit

Permalink
Avoid a test dependency on a C compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
hroncok committed Mar 19, 2020
1 parent 98aa09c commit f4a7fae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/functional/test_wheel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""'pip wheel' tests"""
import os
import re
import sys
from os.path import exists

import pytest
Expand Down Expand Up @@ -293,6 +294,12 @@ def test_pip_wheel_ext_module_with_tmpdir_inside(script, data, common_wheels):
tmpdir = data.src / 'extension/tmp'
tmpdir.mkdir()
script.environ['TMPDIR'] = str(tmpdir)

# To avoid a test dependency on a C compiler, we set the env vars to "noop"
# The .c source is empty anyway
noop = sys.executable + ' -c ""'
script.environ['CC'] = script.environ['LDSHARED'] = str(noop)

result = script.pip(
'wheel', data.src / 'extension',
'--no-index', '-f', common_wheels
Expand Down

0 comments on commit f4a7fae

Please sign in to comment.