Fix arm wheels on macOS (#4017)
This commit is contained in:
parent
448324637d
commit
9e3daa1107
7
.github/workflows/pypi_upload.yml
vendored
7
.github/workflows/pypi_upload.yml
vendored
@ -68,9 +68,10 @@ jobs:
|
|||||||
- name: generate matrix (PR)
|
- name: generate matrix (PR)
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
cibuildwheel --print-build-identifiers --platform linux \
|
{
|
||||||
| pyp 'json.dumps({"only": x, "os": "ubuntu-latest"})' \
|
cibuildwheel --print-build-identifiers --platform linux \
|
||||||
| pyp 'json.dumps(list(map(json.loads, lines)))' > /tmp/matrix
|
| pyp 'json.dumps({"only": x, "os": "ubuntu-latest"})'
|
||||||
|
} | pyp 'json.dumps(list(map(json.loads, lines)))' > /tmp/matrix
|
||||||
env:
|
env:
|
||||||
CIBW_BUILD: "cp38-* cp311-*"
|
CIBW_BUILD: "cp38-* cp311-*"
|
||||||
CIBW_ARCHS_LINUX: x86_64
|
CIBW_ARCHS_LINUX: x86_64
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
|
|
||||||
<!-- Changes that improve Black's performance. -->
|
<!-- Changes that improve Black's performance. -->
|
||||||
|
|
||||||
|
- Fix mypyc builds on arm64 on macOS (#4017)
|
||||||
|
|
||||||
### Output
|
### Output
|
||||||
|
|
||||||
<!-- Changes to Black's terminal output and error messages -->
|
<!-- Changes to Black's terminal output and error messages -->
|
||||||
|
@ -113,6 +113,8 @@ exclude = ["/profiling"]
|
|||||||
[tool.hatch.build.targets.wheel]
|
[tool.hatch.build.targets.wheel]
|
||||||
only-include = ["src"]
|
only-include = ["src"]
|
||||||
sources = ["src"]
|
sources = ["src"]
|
||||||
|
# Note that we change the behaviour of this flag below
|
||||||
|
macos-max-compat = true
|
||||||
|
|
||||||
[tool.hatch.build.targets.wheel.hooks.mypyc]
|
[tool.hatch.build.targets.wheel.hooks.mypyc]
|
||||||
enable-by-default = false
|
enable-by-default = false
|
||||||
@ -175,9 +177,18 @@ before-build = [
|
|||||||
HATCH_BUILD_HOOKS_ENABLE = "1"
|
HATCH_BUILD_HOOKS_ENABLE = "1"
|
||||||
MYPYC_OPT_LEVEL = "3"
|
MYPYC_OPT_LEVEL = "3"
|
||||||
MYPYC_DEBUG_LEVEL = "0"
|
MYPYC_DEBUG_LEVEL = "0"
|
||||||
|
AIOHTTP_NO_EXTENSIONS = "1"
|
||||||
|
|
||||||
# Black needs Clang to compile successfully on Linux.
|
# Black needs Clang to compile successfully on Linux.
|
||||||
CC = "clang"
|
CC = "clang"
|
||||||
AIOHTTP_NO_EXTENSIONS = "1"
|
|
||||||
|
[tool.cibuildwheel.macos]
|
||||||
|
build-frontend = { name = "build", args = ["--no-isolation"] }
|
||||||
|
# Unfortunately, hatch doesn't respect MACOSX_DEPLOYMENT_TARGET
|
||||||
|
before-build = [
|
||||||
|
"python -m pip install 'hatchling==1.18.0' hatch-vcs hatch-fancy-pypi-readme 'hatch-mypyc>=0.16.0' 'mypy==1.5.1' 'click==8.1.3'",
|
||||||
|
"""sed -i '' -e "600,700s/'10_16'/os.environ['MACOSX_DEPLOYMENT_TARGET'].replace('.', '_')/" $(python -c 'import hatchling.builders.wheel as h; print(h.__file__)') """,
|
||||||
|
]
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
atomic = true
|
atomic = true
|
||||||
|
Loading…
Reference in New Issue
Block a user