-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcibuildwheel.toml
More file actions
87 lines (73 loc) · 2.62 KB
/
Copy pathcibuildwheel.toml
File metadata and controls
87 lines (73 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
[tool.cibuildwheel]
build-frontend = "build"
# Don't build 32-bit wheels or PyPy
skip = [
"*-manylinux_i686",
"*-musllinux_i686",
"*-win32",
"pp*",
]
# Apple Silicon support
# When cross-compiling on Intel, it is not possible to test arm64.
# Warnings will be silenced with the following CIBW_TEST_SKIP.
macos.archs = ["x86_64", "arm64"]
test-skip = "*-macosx_arm64"
build-verbosity = 1
linux.before-all = [
"yum install -y llvm-toolset-7.0 || yum -v install -y llvm-toolset-7.0",
]
before-test = [
"pip install -r test-requirements.txt",
]
# pytest looks for configuration files in the parent directories of where the tests live.
# since we are trying to run the tests from their installed location, we copy those into
# the venv. Ew ew ew.
test-command = """pytest {project}/tests"""
# Checking if I can ignore this.
#"""
# \
# ( \
# DIR=$(python -c 'import mypy, os; dn = os.path.dirname; print(dn(dn(mypy.__path__[0])))') \
# && cp '{project}/mypy/pyproject.toml' '{project}/mypy/conftest.py' $DIR \
#\
# && MYPY_TEST_DIR=$(python -c 'import mypy.test; print(mypy.test.__path__[0])') \
# && MYPYC_TEST_DIR=$(python -c 'import mypyc.test; print(mypyc.test.__path__[0])') \
#\
# && MYPY_TEST_PREFIX='{project}/mypy' pytest $MYPY_TEST_DIR $MYPYC_TEST_DIR -k 'not test_external' \
# )
#"""
# I ran into some flaky tests on windows, so only run testcheck. it looks like we
# previously didn't run any tests on windows wheels, so this is a net win.
windows.test-command = """pytest {project}/tests"""
#""" \
# bash -c "( \
# DIR=$(python -c 'import mypy, os; dn = os.path.dirname; print(dn(dn(mypy.__path__[0])))') \
# && cp '{project}/mypy/pyproject.toml' '{project}/mypy/conftest.py' $DIR \
#\
# && MYPY_TEST_DIR=$(python -c 'import mypy.test; print(mypy.test.__path__[0])') \
# && MYPY_TEST_PREFIX='{project}/mypy' pytest $MYPY_TEST_DIR/testcheck.py \
# )"
#"""
# [tool.cibuildwheel.config-settings]
[tool.cibuildwheel.environment]
MYPYC_OPT_LEVEL = "3"
MYPYC_DEBUG_LEVEL = "0"
[tool.cibuildwheel.windows.environment]
MYPYC_OPT_LEVEL = "2"
MYPYC_DEBUG_LEVEL = "0"
[tool.cibuildwheel.linux.environment]
# Add llvm paths to environment to eliminate scl usage (like manylinux image does for gcc toolset).
MYPYC_OPT_LEVEL = "3"
MYPYC_DEBUG_LEVEL = "0"
PATH="$PATH:/opt/rh/llvm-toolset-7.0/root/usr/bin"
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/rh/llvm-toolset-7.0/root/usr/lib64"
CC="clang"
[[tool.cibuildwheel.overrides]]
select = "*musllinux*"
before-all = [
"apk add --no-cache clang",
]
before-test = [
"pip install -r test-requirements.txt",
]
environment = { MYPYC_OPT_LEVEL="3", MYPYC_DEBUG_LEVEL="0", CC="clang" }