Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoodsend committed Sep 12, 2024
1 parent 7c54bac commit dd67dad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cslug/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ def _macos_platform_tag(tag):
# not use the compile args from sysconfig like Python extension modules do.
# The correct version is whatever cslug passed to gcc's
# -mmacosx-version-min parameter.
import re
import re, os
import platform
from cslug._cc import mmacosx_version_min, macos_architecture
print(dict(os.environ))

macos_version = mmacosx_version_min().replace(".", "_")
tag = re.sub(r"macosx[-_]\d+[._]\d+[-_]", f"macosx_{macos_version}_", tag)
Expand Down
4 changes: 4 additions & 0 deletions tests/test_building.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def test_patch_macos_tag(monkeypatch, tag):
from cslug.building import _macos_platform_tag

monkeypatch.setattr(platform, "system", lambda: "Darwin")
with contextlib.suppress(KeyError):
monkeypatch.delenv("MACOSX_ARCHITECTURE")
with contextlib.suppress(KeyError):
monkeypatch.delenv("MACOSX_DEPLOYMENT_TARGET")

monkeypatch.setenv("MACOS_ARCHITECTURE", "x86_64")
monkeypatch.setenv("MACOS_DEPLOYMENT_TARGET", "11")
Expand Down

0 comments on commit dd67dad

Please sign in to comment.