GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix macOS wheel version compatibility warning · latchdevel/pyPiCode@3e70245

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • CMakeLists.txt
  • setup.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎CMakeLists.txt‎

Copy file name to clipboardExpand all lines: CMakeLists.txt
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ set_property( TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE TRUE )
9999
if (APPLE)
100100
set_property( TARGET ${PROJECT_NAME} PROPERTY COMPILE_FLAGS "-arch arm64 -arch x86_64" )
101101
set_property( TARGET ${PROJECT_NAME} PROPERTY LINK_FLAGS "-arch arm64 -arch x86_64" )
102+
set( CMAKE_OSX_DEPLOYMENT_TARGET "11.0" )
102103
endif()
103104

104105
# Add cPiCode library static link
Collapse file

‎setup.py‎

Copy file name to clipboardExpand all lines: setup.py
+19-1Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,27 @@
77
License GNU Lesser General Public License v3.0.
88
"""
99

10+
import os
11+
import platform
12+
import sysconfig
13+
14+
# Ensure macOS deployment target is at least the version Python was built with
15+
if platform.system() == "Darwin":
16+
# Get the version Python was compiled against or default to 11.0
17+
python_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or "11.0"
18+
19+
# Get existing deployment target from environment or default to 11.0
20+
current_target = os.environ.get("MACOSX_DEPLOYMENT_TARGET", "11.0")
21+
22+
# Use the higher version to avoid warnings and ensure compatibility
23+
if float(python_target) > float(current_target):
24+
os.environ["MACOSX_DEPLOYMENT_TARGET"] = python_target
25+
else:
26+
os.environ["MACOSX_DEPLOYMENT_TARGET"] = current_target
27+
1028
from setuptools import setup, Extension
1129
from setuptools.command.build_ext import build_ext
12-
import os, pathlib, subprocess
30+
import pathlib, subprocess
1331

1432
# Add cmake_lists_dir to Extension
1533
class CMakeExtension(Extension):

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.