Skip to content

Commit

Permalink
Fix macos versioning check
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 committed Mar 16, 2024
1 parent f55d9dd commit 08091b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ jobs:
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: auto aarch64
MACOSX_DEPLOYMENT_TARGET: 10.15

- uses: actions/upload-artifact@v3
with:
Expand Down
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,21 @@
try:
if "Darwin" == platform.system():
target: Optional[str] = os.environ.get("MACOSX_DEPLOYMENT_TARGET")
if None is target or float(target) < 10.15:
env_setup_needed: bool = False
if None is target:
env_setup_needed = True
else:
version_values: List[int] = [int(part) for part in target.split(".")]
if 10 >= version_values[0] and 15 >= version_values[1]:
env_setup_needed = True
if env_setup_needed:
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.15"

project_name: str = "clp_ffi_py"
description: str = "CLP FFI Python Interface"
extension_modules: List[Extension] = [ir_native]
if (3, 7) > sys.version_info:
sys.exit(f"The minimum Python version required is Python3.7")
sys.exit("The minimum Python version required is Python3.7")
else:
setup(
name=project_name,
Expand Down

0 comments on commit 08091b8

Please sign in to comment.