File tree 2 files changed +17
-8
lines changed
2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -75,9 +75,14 @@ def create_environ(python_version: str) -> Dict[str, str]:
75
75
76
76
# lxml doesn't have a wheel for Python 3.10 on the manylinux image we use.
77
77
# lxml has historically been slow to support new Pythons as well.
78
- env ['CIBW_BEFORE_TEST' ] = (
79
- 'pip install -r <(grep -v lxml {project}/mypy/test-requirements.txt)'
80
- )
78
+ env ['CIBW_BEFORE_TEST' ] = """
79
+ (
80
+ grep -v lxml {project}/mypy/test-requirements.txt > /tmp/test-requirements.txt
81
+ && cp {project}/mypy/mypy-requirements.txt /tmp/mypy-requirements.txt
82
+ && cp {project}/mypy/build-requirements.txt /tmp/build-requirements.txt
83
+ && pip install -r /tmp/test-requirements.txt
84
+ )
85
+ """ .replace ('\n ' , ' ' )
81
86
82
87
# pytest looks for configuration files in the parent directories of where the tests live.
83
88
# since we are trying to run the tests from their installed location, we copy those into
@@ -94,7 +99,7 @@ def create_environ(python_version: str) -> Dict[str, str]:
94
99
&& MYPY_TEST_PREFIX='{project}/mypy' pytest $MYPY_TEST_DIR -k 'not (reports.test or testreports)'
95
100
96
101
&& MYPYC_TEST_DIR=$(python -c 'import mypyc.test; print(mypyc.test.__path__[0])')
97
- && pytest $MYPYC_TEST_DIR -k 'not test_external'
102
+ && MYPY_TEST_PREFIX='{project}/mypy' pytest $MYPYC_TEST_DIR -k 'not test_external'
98
103
)
99
104
""" .replace ('\n ' , ' ' )
100
105
Original file line number Diff line number Diff line change 1
1
import os
2
2
3
- this_file_dir = os .path .dirname (os .path .realpath (__file__ ))
4
- prefix = os .path .dirname (os .path .dirname (this_file_dir ))
3
+ provided_prefix = os .getenv ('MYPY_TEST_PREFIX' , None )
4
+ if provided_prefix :
5
+ PREFIX = provided_prefix
6
+ else :
7
+ this_file_dir = os .path .dirname (os .path .realpath (__file__ ))
8
+ PREFIX = os .path .dirname (os .path .dirname (this_file_dir ))
5
9
6
- # Locations of test data files such as test case descriptions (.test) .
7
- test_data_prefix = os .path .join (prefix , 'mypyc' , 'test-data' )
10
+ # Location of test data files such as test case descriptions.
11
+ test_data_prefix = os .path .join (PREFIX , 'mypyc' , 'test-data' )
You can’t perform that action at this time.
0 commit comments