Skip to content

Commit

Permalink
Make: Override MACOSX_DEPLOYMENT_TARGET
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Oct 12, 2024
1 parent 1db702a commit fb06b66
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ jobs:
python -m pip install --upgrade pip
pip install pytest pytest-repeat numpy pyarrow
python -m pip install .
env:
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
- name: Test Python
run: pytest scripts/test.py -s -x

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
run: cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp${{ matrix.python-version }}-*
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down
19 changes: 11 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,40 +79,43 @@ before-build = ["rd /s /q {project}\\build || echo Done"]
[[tool.cibuildwheel.overrides]]
select = "*-win_amd64"
inherit.environment = "append"
environment.SZ_X86_64="1"
environment.SZ_X86_64 = "1"

[[tool.cibuildwheel.overrides]]
select = "*-manylinux*_x86_64"
inherit.environment = "append"
environment.SZ_X86_64="1"
environment.SZ_X86_64 = "1"

[[tool.cibuildwheel.overrides]]
select = "*-musllinux*_x86_64"
inherit.environment = "append"
environment.SZ_X86_64="1"
environment.SZ_X86_64 = "1"

[[tool.cibuildwheel.overrides]]
select = "*-macos*_x86_64"
inherit.environment = "append"
environment.SZ_X86_64="1"
environment.SZ_X86_64 = "1"

# Detect ARM 64-bit builds
[[tool.cibuildwheel.overrides]]
select = "*-win_arm64"
inherit.environment = "append"
environment.SZ_ARM64="1"
environment.SZ_ARM64 = "1"

[[tool.cibuildwheel.overrides]]
select = "*-manylinux*_aarch64"
inherit.environment = "append"
environment.SZ_ARM64="1"
environment.SZ_ARM64 = "1"

[[tool.cibuildwheel.overrides]]
select = "*-musllinux*_aarch64"
inherit.environment = "append"
environment.SZ_ARM64="1"
environment.SZ_ARM64 = "1"

[[tool.cibuildwheel.overrides]]
select = "*-macos*_arm64"
inherit.environment = "append"
environment.SZ_ARM64="1"
environment.SZ_ARM64 = "1"

[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "10.11"
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def linux_settings() -> Tuple[List[str], List[str], List[Tuple[str]]]:


def darwin_settings() -> Tuple[List[str], List[str], List[Tuple[str]]]:

compile_args = [
"-std=c99", # use the C 99 language dialect
"-pedantic", # stick close to the C language standard, avoid compiler extensions
Expand All @@ -76,6 +77,7 @@ def darwin_settings() -> Tuple[List[str], List[str], List[Tuple[str]]]:
"-Wno-discarded-qualifiers", # like: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type
"-fPIC", # to enable dynamic dispatch
"-mfloat-abi=hard", # NEON intrinsics not available with the soft-float ABI
"-mmacosx-version-min=11.0", # minimum macOS version
]
link_args = [
"-fPIC", # to enable dynamic dispatch
Expand Down

0 comments on commit fb06b66

Please sign in to comment.