|
22 | 22 | dependencies = [
|
23 | 23 | "mypy",
|
24 | 24 | "typing_extensions>=4.2",
|
| 25 | + "mypy_extensions>=0.4.3", |
25 | 26 | ]
|
26 | 27 |
|
27 | 28 | [project.optional-dependencies]
|
|
51 | 52 |
|
52 | 53 | [build-system]
|
53 | 54 | requires = [
|
54 |
| - "extension-helpers", |
55 |
| - "mypy", |
56 |
| - "setuptools>=45", |
57 |
| - "setuptools_scm>=6.2", |
| 55 | + "mypy>=0.971", |
| 56 | + "setuptools>=45.0", |
| 57 | + "setuptools_scm[toml]>=6.3.1", |
58 | 58 | "wheel",
|
59 | 59 | ]
|
60 | 60 |
|
|
66 | 66 | [tool.setuptools_scm]
|
67 | 67 |
|
68 | 68 |
|
| 69 | +[tool.cibuildwheel] |
| 70 | + build-verbosity = 1 |
| 71 | + # So these are the environments we target: |
| 72 | + # - Python: CPython 3.8+ only |
| 73 | + # - Architecture (64-bit only): amd64 / x86_64, universal2, and arm64 |
| 74 | + # - OS: Linux (no musl), Windows, and macOS |
| 75 | + build = "cp3*-*" |
| 76 | + skip = ["*-manylinux_i686", "*-musllinux_*", "*-win32", "pp-*"] |
| 77 | + before-build = ["pip install -r .github/mypyc-requirements.txt"] |
| 78 | + # This is the bare minimum needed to run the test suite. Pulling in the full |
| 79 | + # test_requirements.txt would download a bunch of other packages not necessary |
| 80 | + # here and would slow down the testing step a fair bit. |
| 81 | + test-requires = ["pytest>=6.1.1"] |
| 82 | + test-command = 'pytest {project} -k "not incompatible_with_mypyc"' |
| 83 | + # Skip trying to test arm64 builds on Intel Macs. (so cross-compilation doesn't |
| 84 | + # straight up crash) |
| 85 | + test-skip = ["*-macosx_arm64", "*-macosx_universal2:arm64"] |
| 86 | + |
| 87 | +[tool.cibuildwheel.environment] |
| 88 | + BLACK_USE_MYPYC = "1" |
| 89 | + MYPYC_OPT_LEVEL = "3" |
| 90 | + MYPYC_DEBUG_LEVEL = "0" |
| 91 | + # The dependencies required to build wheels with mypyc aren't specified in |
| 92 | + # [build-system].requires so we'll have to manage the build environment ourselves. |
| 93 | + PIP_NO_BUILD_ISOLATION = "no" |
| 94 | + |
| 95 | +[tool.cibuildwheel.linux] |
| 96 | + before-build = [ |
| 97 | + "pip install -r .github/mypyc-requirements.txt", |
| 98 | + "yum install -y clang", |
| 99 | + ] |
| 100 | + # Newer images break the builds, not sure why. We'll need to investigate more later. |
| 101 | + manylinux-x86_64-image = "quay.io/pypa/manylinux2014_x86_64:2021-11-20-f410d11" |
| 102 | + |
| 103 | +[tool.cibuildwheel.linux.environment] |
| 104 | + BLACK_USE_MYPYC = "1" |
| 105 | + MYPYC_OPT_LEVEL = "3" |
| 106 | + MYPYC_DEBUG_LEVEL = "0" |
| 107 | + PIP_NO_BUILD_ISOLATION = "no" |
| 108 | + |
| 109 | +[tool.cibuildwheel.windows] |
| 110 | + before-build = ["pip install -r .github/mypyc-requirements.txt"] |
| 111 | + |
| 112 | + |
69 | 113 | [tool.autopep8]
|
70 | 114 | max_line_length = 120
|
71 | 115 | in-place = true
|
|
99 | 143 | ensure_newline_before_comments = "True"
|
100 | 144 | sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
|
101 | 145 | known_localfolder = "overload_numpy"
|
102 |
| - known_third_party = ["astropy", "matplotlib", "numpy", "pytest", "scipy", "setuptools"] |
| 146 | + known_third_party = ["numpy", "pytest"] |
103 | 147 | import_heading_stdlib = "STDLIB"
|
104 | 148 | import_heading_thirdparty = "THIRD PARTY"
|
105 | 149 | import_heading_localfolder = "LOCAL"
|
|
134 | 178 | astropy_header = "True"
|
135 | 179 | doctest_plus = "enabled"
|
136 | 180 | text_file_format = "rst"
|
137 |
| - addopts = "--doctest-rst --ignore-glob=docs/papers_and_presentations/*" |
| 181 | + addopts = "--doctest-rst" |
| 182 | + markers = [ |
| 183 | + "incompatible_with_mypyc: run when testing mypyc compiled black" |
| 184 | + ] |
138 | 185 | filterwarnings = [
|
139 | 186 | # tomlkit
|
140 | 187 | "ignore:The config value `project' has type `String', defaults to `str'.",
|
|
0 commit comments